Skip to content

Fix 40 bugs: callables, stdlib, spread, array repr, dispatch, leaks - #410

Merged
blacktrs merged 41 commits into
mainfrom
fix/bug-sweep-2026-10
Oct 23, 2026
Merged

blacktrs merged 41 commits into
mainfrom
fix/bug-sweep-2026-10

Conversation

@blacktrs

Copy link
Copy Markdown
Contributor

What

A sweep of 40 open bugs, grouped by root cause. Each fix has its repro promoted to tests/aot/cases/; full AOT suite on this branch: 2346 pass, 0 fail, 2 skip (macOS arm64).

Fixes

Fixes #230, Fixes #242, Fixes #243, Fixes #252, Fixes #257, Fixes #261, Fixes #262, Fixes #265, Fixes #268, Fixes #284, Fixes #291, Fixes #292, Fixes #293, Fixes #319, Fixes #320, Fixes #321, Fixes #322, Fixes #323, Fixes #324, Fixes #325, Fixes #337, Fixes #348, Fixes #354, Fixes #373, Fixes #375, Fixes #376, Fixes #378, Fixes #379, Fixes #382, Fixes #383, Fixes #384, Fixes #385, Fixes #388, Fixes #389, Fixes #390, Fixes #391, Fixes #392, Fixes #393, Fixes #394, Fixes #396

Not in this PR (still open)

#260 (temporaries on the unwind path), #264 (get_defined_vars, deprioritised), #244, #295, #395 ($z = &$y leak).

Review notes

…l cell base, single-char numeric range

Fixes #320
Fixes #321
Fixes #322
Fixes #325
Fixes #284
… dynamic-call table, tagged name into callable params, is_callable over the function table

Fixes #230
Fixes #252
Fixes #323
Fixes #324
…ss_vars

Enum-typed values carry the case ordinal, so is_object/is_null no longer
test it as a pointer. get_object_vars() and get_class_vars() are lowered with
the calling class so outside code sees public properties only.

Fixes #319
Fixes #337
Fixes #265
…ead of expanding it across the declared slots (Fixes #375)
…t cell and merges a hint-boxed copy: $r = [...$r, [$p, 2]] from $r = [] stored raw words in an unstamped buffer read back as floats. Fixes #379
…wn closure at run time, throwing ArgumentCountError when required slots are missing (Fixes #385)
…omorphize too, where an element store would re-narrow the join, and de-cellify a borrowed cell-element array argument into a co-owned typed copy at a concrete-element param. Fixes #376. Fixes #384
box_unknown tagged a raw generator frame as an int, and cell retain/drop
treated an object-tagged frame as a closure env, so a generator a closure
returned through an erased slot was never released.

Fixes #268
The capture box owns its value; the enclosing frame already gave the old
one back on its own stores, the closure side never did.

Fixes #348
…thout requiring a __call class

Closure __invoke/call work on a mixed receiver in any program; non-closure
objects and scalars get Zend's undefined-method / member-function-on-type
errors. Typed Closure->__invoke() lowers to a direct closure call.
The return already retains the value; the box release retained it again. Fixes #394
…bject words

Impure erased callees reach the __invoke arm via a scratch local, Closure::call()
strips the cell tag of an erased newThis, and ->__invoke() on an erased receiver
tells a Closure env from an invokable object.

Fixes #389
Fixes #390
Fixes #396
…dary must not retype it to the sig's concrete element
@blacktrs
blacktrs merged commit 546c54b into main Oct 23, 2026
13 checks passed
@blacktrs
blacktrs deleted the fix/bug-sweep-2026-10 branch October 23, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment