Problem
make bootstrap-aot-link fails: every AOT fixture compile segfaults (exit 139) in Runtime::standalone() → JITContext construction.
Root cause: CallArgv::$htGlobal is a process-wide static initialized on the first LLVM module, but nested JIT helper compilation during defineBuiltins() (e.g. WeakRefRegistryRuntime::ensureJitHelperCompiled) can emit CallArgv::emitStore() on a different JIT\Context module. FFI then passes incompatible LLVMOpaqueValue* handles (LLVMBuildStore / segfault).
Reference pattern
LateStaticBindingGlobals already guards with $classIdModule — static Value must not leak across Context instances.
Repro
source script/php-env.sh
php bin/compile.php -o /tmp/echo_hello test/bootstrap-aot/echo_hello.php
# Segmentation fault (core dumped), exit 139
EMBED mode surfaces the FFI error:
FFI\Exception: Passing incompatible argument 3 of C function 'LLVMBuildStore' ...
#0 lib/JIT/Builtin/CallArgv.php(38)
Done when
php bin/compile.php -o /tmp/echo_hello test/bootstrap-aot/echo_hello.php succeeds
make bootstrap-aot-link green (or first failing fixture documented if separate)
- Existing
func_get_args JIT tests still pass
Refs #197, #10916, #1492
Problem
make bootstrap-aot-linkfails: every AOT fixture compile segfaults (exit 139) inRuntime::standalone()→JITContextconstruction.Root cause:
CallArgv::$htGlobalis a process-wide static initialized on the first LLVM module, but nested JIT helper compilation duringdefineBuiltins()(e.g.WeakRefRegistryRuntime::ensureJitHelperCompiled) can emitCallArgv::emitStore()on a differentJIT\Contextmodule. FFI then passes incompatibleLLVMOpaqueValue*handles (LLVMBuildStore/ segfault).Reference pattern
LateStaticBindingGlobalsalready guards with$classIdModule— static Value must not leak across Context instances.Repro
EMBED mode surfaces the FFI error:
Done when
php bin/compile.php -o /tmp/echo_hello test/bootstrap-aot/echo_hello.phpsucceedsmake bootstrap-aot-linkgreen (or first failing fixture documented if separate)func_get_argsJIT tests still passRefs #197, #10916, #1492