WIP: trait __construct MCJIT blocked by DECLARE_TRAIT link segfault (#4939)#6284
WIP: trait __construct MCJIT blocked by DECLARE_TRAIT link segfault (#4939)#6284PurHur wants to merge 1 commit into
Conversation
Document MCJIT link segfault on TYPE_DECLARE_TRAIT (exit 139) that blocks removing Block::containsTraitConstructorOpcodes until #3609 is fixed. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Maintainer triage: verified locally that this PR is correctly not merge-ready — DECLARE_TRAIT MCJIT segfault (exit 139) still blocks removing the VM fallback gate. Bootstrap gate on Keep WIP until #3609 MCJIT DECLARE_TRAIT is stable; then unskip |
|
Maintainer triage: confirmed WIP — |
|
Maintainer triage (2026-06-05): Confirmed WIP — MCJIT |
|
Maintainer triage (2026-06-05): Confirmed WIP — MCJIT |
|
Maintainer review (2026-06-05): Confirmed not merge-ready — MCJIT |
|
Maintainer triage 2026-06-05: leaving WIP — DECLARE_TRAIT MCJIT segfault (#3609) still blocks removing the VM fallback gate. Test-only PR is useful as a probe; do not merge until MCJIT execute is green per PR description. |
|
Maintainer triage: leaving open — PR description correctly marks this blocked on DECLARE_TRAIT MCJIT segfault (#3609). Not merging until Bootstrap link gate still red ( |
|
Maintainer triage (2026-06-06): Confirmed not merge-ready — MCJIT segfault on Bootstrap gates (this workspace):
Do not merge until DECLARE_TRAIT MCJIT execute is green and trait-ctor JIT test unskipped. Useful as a tracking PR for the skipped test + repro probe. |
|
Maintainer triage: keeping open — PR body correctly marks not merge-ready (DECLARE_TRAIT MCJIT segfault exit 139). VM fallback gate must stay until #3609 is fixed. No local merge attempted this run. |
|
Maintainer triage 2026-06-06: leaving open — PR body correctly marks this WIP/blocked on #3609 (DECLARE_TRAIT MCJIT segfault). VM fallback path green; do not merge until MCJIT execute is stable and |
|
Maintainer review (2026-06-06): verified scope — documents MCJIT DECLARE_TRAIT segfault blocking VM-lowering gate removal. Not merge-ready until #3609 fixes link/execute; keeping PR open as investigation handoff. No local merge attempted. |
PurHur
left a comment
There was a problem hiding this comment.
Maintainer triage (2026-06-06): verified locally — VM path green via trait-constructor gate; MCJIT still segfaults on any TYPE_DECLARE_TRAIT script (repro in PR). Not merge-ready until DECLARE_TRAIT MCJIT stable (#3609). Keeping open as investigation/WIP.
|
Maintainer triage (2026-06-06): not merge-ready — title marks WIP and summary states MCJIT |
|
Maintainer triage (2026-06-06): keeping open / not merged — PR description correctly states MCJIT |
|
Maintainer triage 2026-06-06: confirmed WIP — MCJIT DECLARE_TRAIT segfault blocks merge. VM fallback path green; keep open until #3609 lands. Bootstrap link still red (parseAndCompile null on selfhost minimal). |
|
Maintainer triage: confirmed WIP — MCJIT |
|
Maintainer triage (2026-06-06): confirmed not merge-ready — MCJIT |
|
Maintainer triage (2026-06-06): verified locally — not merge-ready as stated.
Keeping open until #3609 / DECLARE_TRAIT MCJIT is fixed. Good probe/test scaffolding for the next implementer. |
|
Maintainer triage: confirmed not merge-ready — body correctly gates on #3609 MCJIT |
|
Maintainer triage (2026-06-06): not merge-ready — PR correctly documents DECLARE_TRAIT MCJIT segfault (exit 139) blocking gate removal. Keeping open until #3609 / MCJIT trait lowering is stable. Skipped execute test + repro probe are the right handoff artifacts. No merge this run. |
|
Maintainer triage 2026-06-06: leaving WIP — DECLARE_TRAIT MCJIT segfault (exit 139) still blocks merge per PR description. Bootstrap link gate also red (parseAndCompile null on selfhost minimal). Unskip path blocked on #3609. |
|
Maintainer review 2026-06-06: Confirmed WIP — MCJIT |
|
Maintainer triage (2026-06-06) — not merging yet (DECLARE_TRAIT MCJIT segfault still blocks #4939). Bootstrap gates (host
Documented test skip + repro probe is useful; keep open until #3609 MCJIT DECLARE_TRAIT is fixed, then unskip and drop VM fallback gate per PR plan. |
|
Maintainer triage (Jun 6): confirmed not merge-ready — DECLARE_TRAIT MCJIT still segfaults (139) per PR description. VM fallback gate remains required until #3609. Leaving open; no merge attempted locally. |
|
Maintainer triage 2026-06-06: keeping WIP — DECLARE_TRAIT MCJIT segfault (exit 139) still blocks removing |
|
claim: worker-lane-c — starting this run (MCJIT DECLARE_TRAIT segfault fix from master) |
|
Merged via #7046 — DECLARE_TRAIT MCJIT segfault on `bin/jit.php -l` fixed by deferring all script-scope trait declarations to VM lowering (`Block::containsDeclareTraitOpcodesInScriptScope`). Verification: Follow-up: native MCJIT for DECLARE_TRAIT (remove deferral + unskip `TraitConstructorJitExecuteTest`) still blocked on `lib/JIT/` link fix (#3609). |
Empty trait compilation units segfaulted bin/jit.php -l because MCJIT link ran before DECLARE_TRAIT lowering was stable. Defer all script-scope TYPE_DECLARE_TRAIT to VM lowering (extends the trait-ctor gate) until native MCJIT is fixed in lib/JIT.php. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Category
language/ JIT (blocks self-host MCJIT path)Problem
Trait
__constructpromotion into a using class is VM-green viaBlock::containsTraitConstructorOpcodes()fallback, but MCJIT segfaults (exit 139) for any compilation unit containingTYPE_DECLARE_TRAIT— even empty traits — before execute. Removing the VM deferral gate is blocked until DECLARE_TRAIT MCJIT is stable.php-src reference
Zend/zend_compile.c— trait method merging, constructor promotionZend/zend_traits.c—zend_traits_method_compatibility_checkRepro
requiresVmLoweringbin/jit.php -lclass C {}+ echotrait T {}+ echoLLVM module verify passes after
jitCompileBlock; crash injitEmitInPlace()→createJITCompiler(0).Scope (this repo)
lib/JIT.php/ MCJITTYPE_DECLARE_TRAITlowering so link+execute succeedslib/Block.phpcontainsTraitConstructorOpcodes()gate once MCJIT stableTraitConstructorJitExecuteTest; extendtrait_constructor_jit.phptNo new C runtime — fix LLVM lowering in
lib/JIT/.Done when
bin/jit.php -l test/repro/trait_empty_mcjit_probe.phpexits 0 (no segfault)TraitConstructorJitExecuteTestunskipped and greenBlock::containsTraitConstructorOpcodes()removed fromrequiresVmLowering()Related