Repository navigation
Self-host M5: fix new Runtime() LLVM 9 segfault under SELFHOST_AOT (#2600) - #2696
Merged
Merged
Conversation
…OT (#2600). Use a minimal external Runtime object layout for self-host AOT so allocate() does not init the full spine property graph. Route M3 compile-driver Runtime::__construct through the native vmContext stub instead of PHP CFG lowering that never ran under PHP_COMPILER_M3_COMPILE_DRIVER. bin/compile.php AOT link still fails at Runtime::standalone LLVM verify; native emit via sidecar remains blocked until that spine slice lands. Co-authored-by: Cursor <cursoragent@cursor.com>
Closed
3 tasks
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
PHP_COMPILER_SELFHOST_AOT=1, externalPHPCompiler\Runtimenow registers a minimal object layout (mode only) sonew Runtime(...)JIT lowering no longer segfaults LLVM 9 during property init.Runtime::__constructthrough the native vmContext stub (fixes compile-driver path that previously fell through to full PHP CFG lowering).PHP_COMPILER_M3_COMPILE_DRIVER=1in M3 emit sidecar host-compile env forbin/compile.php.Verification
Remaining blocker (#2600)
php bin/compile.php -o … bin/compile.phpstill fails atRuntime::standalone()with LLVM module verification (Terminator found in the middle of a basic block). Native emit ofbin/compile.phpviamake bootstrap-selfhost-helloworld-compile-binremains blocked atparseAndCompile returned nulluntil the sidecar host-compile succeeds.Closes #2600 partially — next slice is Runtime::standalone spine lowering for production driver AOT link.
Made with Cursor