Fix AOT function-scoped array append segfault (revert #36314 delref dtor CFG) - #36331
Merged
Merged
Conversation
…dtor/GC CFG (#36215) #36314 wired __hashtable__/__object__ dtors into __ref__delref and #36195 moved emitPossibleGcRootOnDelref into the wrong CFG block. Together they segfault on the first `$a[] = …` inside a user function while {main} append still works. Restore the #36252 Refcount delref body until dtor/GC lowering is fixed with a regression test (g_fn_array_append.php). Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Sep 2, 2026
PurHur
added a commit
that referenced
this pull request
Sep 2, 2026
…36427) Wave-1 mandelbrot timeout (>60s, 51s sys) was fixed on master by reverting the broken delref/dtor CFG (#36331); absolute targets are now met (mandelbrot 0.09s, simple 0.14s). Refresh benchmarks/BASELINE.json from pinned image and add a differential case for the Julia while-loop shape. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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
#36314/#36195changes tolib/JIT/Builtin/Refcount.php::__ref__delrefthat segfault on the first$a[] = …inside a user function (g_fn_array_append.php,test/repro/issue_36252_fn_array_append.php).#36252delref body: header-only free without__hashtable__dtor/ misplacedemitPossibleGcRootOnDelrefin the keep-alive CFG block.{main}append continued to work; function CV append was broken — differentialg_fn_array_append0/3, Zend16000.Root cause
Bisect on master:
4f814aad66(#36252) passes fn append; HEAD with#36314dtor wiring fails. Removing only__hashtable__dtoris insufficient — the#36195GC-root emit placement corrupts the delref CFG for refcounted arrays in function frames.Test plan
Follow-up: re-land
#36215dtor +#36195GC-root with fn-append regression in differential corpus.Closes #36215 (partial — dtor deferred)
Made with Cursor