Skip to content

Runtime: container dtors on __ref__delref rc=0 (#36215) - #36314

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36215-dtor-clean
Sep 2, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-36215-dtor-clean

Conversation

@PurHur

@PurHur PurHur commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add __hashtable__dtor / __object__dtor LLVM helpers and dispatch from __ref__delref when rc reaches 0 (delref packed values, string-key chains, property boxes — not header-only free).
  • Supersedes Runtime: hashtable/object dtors and assign-source release (#36215) #36306: the assign-source release path in that PR caused miniwebapp empty output (double-delref via copyIntoPointer + explicit release). Assign-source release deferred to a follow-up.

php-src: Zend/zend_variables.czend_array_destroy / zend_objects_store_del.

Verification

make dev-verify-fast
# aot-smoke: 9 passed, 0 failed (incl. miniwebapp home route)
# VM differential tier-0: 15/15 match Zend
# dev-verify-fast: OK (71s wall)

Not run this run: north-star5-verify-fast (host apply-patches.sh fails on php-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

…=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>
@PurHur
PurHur merged commit 59b42c2 into master Sep 2, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-36215-dtor-clean branch September 2, 2026 08:25
PurHur added a commit that referenced this pull request Sep 2, 2026
…#36321)

#36314 merged container dtors without updating compiler_lib_spine_smoke,
which blocked north-star5-verify-fast step 2 (8074/8076 spine coverage).

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
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant