Regression: restore standalone AOT GC LLVM cycle scan (#18630)#18726
Merged
Conversation
#18640 nested-JIT of GcCollectCyclesNativeScanJitHelper broke all standalone AOT compiles (LLVM module verify: writeHashtable type mismatch). Restore GcCollectCyclesStandaloneLlvm for standalone collect/registry; keep PHP registry on embed. Hash context incremental AOT + HelloWorld compile green again. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 13, 2026
Owner
Author
|
Merged spine follow-up #18735 — added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a master regression introduced by #18640 (#18630): nested-JIT of
GcCollectCyclesNativeScanJitHelperduring standalone AOT init produced invalid LLVM IR (__value__writeHashtabletype mismatch), breaking allbin/compile.phpstandalone builds including HelloWorld, hash, and password_hash AOT fixtures.Root cause: #18640 set
usesPhpRegistry()always true and routed standalonephpc_gc_collect_cycles_implthrough PHP array scan helpers; nested JIT of those helpers fails module verify.Fix: Restore pre-#18640 dual path — embed uses PHP registry (
GcCollectCyclesRegistryJitHelper); standalone usesGcCollectCyclesStandaloneLlvmfor cycle scan/registry LLVM (same as #17015). Keeps #18630 PHP-in-PHP goal for embed; defers standalone PHP scan until nested array JIT is safe.php-src reference
Zend/zend_gc.c— gc_collect_cycles / root bufferVerification
Closes #18630 (regression follow-up — full standalone PHP GC scan remains future work)
Made with Cursor