aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_record.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 03fcb966..cded81e0 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -368,7 +368,8 @@ static int innerloopleft(jit_State *J, const BCIns *pc)
368static void rec_loop_interp(jit_State *J, const BCIns *pc, LoopEvent ev) 368static void rec_loop_interp(jit_State *J, const BCIns *pc, LoopEvent ev)
369{ 369{
370 if (J->parent == 0) { 370 if (J->parent == 0) {
371 if (pc == J->startpc && J->framedepth == 0) { /* Same loop? */ 371 if (pc == J->startpc && J->framedepth == 0 && !J->chain[IR_RETF]) {
372 /* Same loop? */
372 if (ev == LOOPEV_LEAVE) /* Must loop back to form a root trace. */ 373 if (ev == LOOPEV_LEAVE) /* Must loop back to form a root trace. */
373 lj_trace_err(J, LJ_TRERR_LLEAVE); 374 lj_trace_err(J, LJ_TRERR_LLEAVE);
374 rec_stop(J, J->curtrace); /* Root trace forms a loop. */ 375 rec_stop(J, J->curtrace); /* Root trace forms a loop. */