Prevent unroll across BC_ITERN.

Reported by Marukyu.
master
Mike Pall 2022-01-16 21:01:52 +01:00
parent 1dddc55ca3
commit 4077f0c3d6
1 changed files with 1 additions and 0 deletions

View File

@ -667,6 +667,7 @@ static LoopEvent rec_itern(jit_State *J, BCReg ra, BCReg rb)
(J->cur.nins > REF_FIRST+1 ||
(J->cur.nins == REF_FIRST+1 && J->cur.ir[REF_FIRST].o != IR_PROF)) &&
J->framedepth + J->retdepth == 0 && J->parent == 0 && J->exitno == 0) {
J->instunroll = 0; /* Cannot continue unrolling across an ITERN. */
lj_record_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Looping trace. */
return LOOPEV_ENTER;
}