]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Prevent snapshot purge while recording a function header.
authorMike Pall <mike>
Wed, 11 Feb 2026 22:04:42 +0000 (23:04 +0100)
committerMike Pall <mike>
Wed, 11 Feb 2026 22:04:42 +0000 (23:04 +0100)
Thanks to Sergey Kaplun. #1425

src/lj_record.c

index c203a0c76d4bd8cad8b9bd18bb018db79b208908..1919ab03bc1f7a1a0fcaa07ed7656bf1884e56d4 100644 (file)
@@ -2276,7 +2276,7 @@ void lj_record_ins(jit_State *J)
   /* Need snapshot before recording next bytecode (e.g. after a store). */
   if (J->needsnap) {
     J->needsnap = 0;
-    if (J->pt) lj_snap_purge(J);
+    if (J->pt && bc_op(*J->pc) < BC_FUNCF) lj_snap_purge(J);
     lj_snap_add(J);
     J->mergesnap = 1;
   }