소스 검색

Don't bail out to interpreter to JLOOP originating from ITERN.

Otherwise forward progress is not guaranteed.
Reported by Yichun Zhang.
Mike Pall 4 년 전
부모
커밋
28440544ba
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/lj_record.c

+ 5 - 3
src/lj_record.c

@@ -2765,9 +2765,11 @@ void lj_record_setup(jit_State *J)
     }
     lj_snap_replay(J, T);
   sidecheck:
-    if (traceref(J, J->cur.root)->nchild >= J->param[JIT_P_maxside] ||
-	T->snap[J->exitno].count >= J->param[JIT_P_hotexit] +
-				    J->param[JIT_P_tryside]) {
+    if ((traceref(J, J->cur.root)->nchild >= J->param[JIT_P_maxside] ||
+	 T->snap[J->exitno].count >= J->param[JIT_P_hotexit] +
+				     J->param[JIT_P_tryside]) &&
+	!(bc_op(*J->pc) == BC_JLOOP &&
+	  bc_op(traceref(J, bc_d(*J->pc))->startins) == BC_ITERN)) {
       lj_record_stop(J, LJ_TRLINK_INTERP, 0);
     }
   } else {  /* Root trace. */