Runtime: container dtors on __ref__delref rc=0 (#36215) - #36314
Merged
Merged
Conversation
…=0 (#36215) When refcount drops to zero, destroy packed values, string-key chains, and object property boxes before freeing the header — not header-only free. Supersedes broken PR #36306 (assign-source release caused miniwebapp empty output). Assign-source release deferred to a follow-up. Verified: make dev-verify-fast OK (aot-smoke 9/9 + miniwebapp, VM tier-0 15/15). 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
#36215) (#36324) north-star5-verify-fast step 2 was red — Phase A inventory listed the dtor helpers merged in #36314 but compiler_lib_spine_smoke/main.php did not require_once them. Refreshes sidecar stamp after VM driver probe. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Sep 2, 2026
…dtor/GC CFG (#36215) (#36331) #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: 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
__hashtable__dtor/__object__dtorLLVM helpers and dispatch from__ref__delrefwhen rc reaches 0 (delref packed values, string-key chains, property boxes — not header-only free).copyIntoPointer+ explicit release). Assign-source release deferred to a follow-up.php-src:
Zend/zend_variables.c→zend_array_destroy/zend_objects_store_del.Verification
Not run this run:
north-star5-verify-fast(hostapply-patches.shfails onphp-llvm-abstract-ffi-global.patch— pre-existing harness drift; Docker dev-verify-fast path green).Closes #36215 (partial — leak repro still scales linearly when temps are not delref'd in
{main}; dtor wiring is the refcount=0 half).Made with Cursor