Skip to content

AOT: fix bare self/parent typed property assigns from locals (#31835) - #35705

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-31835-aot-self-parent-typed-prop
Aug 29, 2026
Merged

AOT: fix bare self/parent typed property assigns from locals (#31835)#35705
PurHur merged 1 commit into
masterfrom
agent/issue-31835-aot-self-parent-typed-prop

Conversation

@PurHur

@PurHur PurHur commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix native TYPE_OBJECT property stores when the RHS is a boxed local (__value____object__* via __value__readObject) — the value-box path was writing to object slots and reads returned garbage (WeakRefRegistryJitHelper, etc.).
  • Register resolved classConstraint metadata on JIT property slots and enforce catchable TypeErrors for bare self/parent/class-typed properties under AOT (VM fixed in Language: early-bind bare self/parent property types (#31835) #31841; AOT was still open).

Closes #31835

Test plan

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/phpunit.sh --filter 'TypedPropSelfParent31835Aot'
# OK (2 tests, 12 assertions)

Made with Cursor

VM resolved self/parent in 31841 but native TYPE_OBJECT property slots still
stored boxed __value__ operands via the value-box path, yielding garbage reads.
Read __object__* from value boxes on store and enforce class constraints with
catchable TypeErrors matching Zend.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit f10606c into master Aug 29, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-31835-aot-self-parent-typed-prop branch August 29, 2026 08:17
PurHur added a commit that referenced this pull request Aug 29, 2026
…. (#35708)

#35705 landed the AOT typed-property class assign helper but omitted spine
coverage; ci-fast spine-sync was red with one missing inventory file.

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

Development

Successfully merging this pull request may close these issues.

Language: bare self/parent typed properties reject valid assignments — Zend accepts (?self/unions OK) (zend_execute / TypeCheck)

1 participant