DUALNUM: Fix recording of loops broken by previous change.

Thanks to Nicholas Davies. #1432 #1433 #1438
This commit is contained in:
Mike Pall
2026-02-16 18:00:33 +01:00
parent 26fd1a7d67
commit 1c3b5a4d72

View File

@@ -527,9 +527,9 @@ static LoopEvent rec_for(jit_State *J, const BCIns *fori, int isforl)
TRef stop; TRef stop;
IRType t; IRType t;
/* Avoid semantic mismatches and always failing guards. */ /* Avoid semantic mismatches and always failing guards. */
if (tvisnan(&tv[FORL_IDX]) || if ((tvisnum(&tv[FORL_IDX]) && tvisnan(&tv[FORL_IDX])) ||
tvisnan(&tv[FORL_STOP]) || (tvisnum(&tv[FORL_STOP]) && tvisnan(&tv[FORL_STOP])) ||
tvisnan(&tv[FORL_STEP]) || (tvisnum(&tv[FORL_STEP]) && tvisnan(&tv[FORL_STEP])) ||
tvismzero(&tv[FORL_STEP])) tvismzero(&tv[FORL_STEP]))
lj_trace_err(J, LJ_TRERR_GFAIL); lj_trace_err(J, LJ_TRERR_GFAIL);
if (isforl) { /* Handle FORL/JFORL opcodes. */ if (isforl) { /* Handle FORL/JFORL opcodes. */