From f978792e627e6ed3a24fd047242f09ed25667362 Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 29 Mar 2026 19:57:31 +0000 Subject: [PATCH] JIT: don't mutate l_compiled when skipping warned closures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting jit_failed_sentinel on new instances of warned function names caused hanging — the mutation interfered with CEK execution. Now just return None without touching l_compiled. The _jit_warned hash lookup is a cheap check per call with no side effects. Co-Authored-By: Claude Opus 4.6 (1M context) --- hosts/ocaml/bin/sx_server.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 0b168dac..00f3c0bd 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -728,8 +728,7 @@ let register_jit_hook env = | Some _ -> None (* compile failed or disabled — CEK handles *) | None -> if !_jit_compiling then None - else if Hashtbl.mem _jit_warned fn_name then - (l.l_compiled <- Some Sx_vm.jit_failed_sentinel; None) + else if Hashtbl.mem _jit_warned fn_name then None else begin _jit_compiling := true; let t0 = Unix.gettimeofday () in