]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Respect jit.off() on pending trace exit.
authorMike Pall <mike>
Sat, 23 Dec 2023 18:22:34 +0000 (19:22 +0100)
committerMike Pall <mike>
Sat, 23 Dec 2023 18:22:34 +0000 (19:22 +0100)
Thanks to Sergey Kaplun. #1134

src/lj_trace.c

index 25e610b58992a92bb2ed6fdc74eff3509d58d82f..d015f2ab9267140effecbb220755611eeb6145a7 100644 (file)
@@ -804,7 +804,7 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr)
   if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) {
     if (!(G(L)->hookmask & HOOK_GC))
       lj_gc_step(L);  /* Exited because of GC: drive GC forward. */
-  } else {
+  } else if ((J->flags & JIT_F_ON)) {
     trace_hotside(J, pc);
   }
   if (bc_op(*pc) == BC_JLOOP) {