Skip to content

AOT: XPath item() live walk + tag-list attrs for setIdAttribute (#35447) - #35448

Merged
PurHur merged 1 commit into
masterfrom
fix/35447-xpath-item-setidattribute
Aug 27, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/35447-xpath-item-setidattribute

Conversation

@PurHur

@PurHur PurHur commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: ext/dom/xpath.c (query), ext/dom/nodelist.c (item), ext/dom/element.c (setIdAttribute → xmlAddID).

Test plan

Made with Cursor

DOMXPath::query()->item() rematerialized a detached node and stamped
childNodes[$N] attrs, so getAttribute was wrong and setIdAttribute SIGSEGV'd.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 2b7ce4d into master Aug 27, 2026
1 check failed
@PurHur
PurHur deleted the fix/35447-xpath-item-setidattribute branch August 27, 2026 10:45
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.

AOT: DOMXPath query()->item()->setIdAttribute segfaults — compile-time attrs stolen from childNodes[$N] (ext/dom/xpath.c)

1 participant