diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_record.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 4fe1a056..30722814 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
| @@ -663,7 +663,9 @@ static LoopEvent rec_itern(jit_State *J, BCReg ra, BCReg rb) | |||
| 663 | #else | 663 | #else |
| 664 | RecordIndex ix; | 664 | RecordIndex ix; |
| 665 | /* Since ITERN is recorded at the start, we need our own loop detection. */ | 665 | /* Since ITERN is recorded at the start, we need our own loop detection. */ |
| 666 | if (J->pc == J->startpc && J->cur.nins > REF_FIRST && | 666 | if (J->pc == J->startpc && |
| 667 | (J->cur.nins > REF_FIRST+1 || | ||
| 668 | (J->cur.nins == REF_FIRST+1 && J->cur.ir[REF_FIRST].o != IR_PROF)) && | ||
| 667 | J->framedepth + J->retdepth == 0 && J->parent == 0 && J->exitno == 0) { | 669 | J->framedepth + J->retdepth == 0 && J->parent == 0 && J->exitno == 0) { |
| 668 | lj_record_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Looping trace. */ | 670 | lj_record_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Looping trace. */ |
| 669 | return LOOPEV_ENTER; | 671 | return LOOPEV_ENTER; |
