Skip to content

ext/dom: Do not recursively normalize descendant elements - #23139

Closed
LamentXU123 wants to merge 2 commits into
php:PHP-8.4from
LamentXU123:dom-stackoverflow
Closed

ext/dom: Do not recursively normalize descendant elements#23139
LamentXU123 wants to merge 2 commits into
php:PHP-8.4from
LamentXU123:dom-stackoverflow

Conversation

@LamentXU123

@LamentXU123 LamentXU123 commented Aug 8, 2026

Copy link
Copy Markdown
Member

#23117 and #23116 are basically a same bug. DOMNode::normalize() and Dom\Node::normalize() recursively normalized descendant elements. Deeply nested trees could therefore exhaust the C stack.

We already have helpers to solve this. These two functions are using legacy implementations, so just update the helper can solve this.

Closes GH-23116.
Closes GH-23117.

@devnexen

devnexen commented Aug 8, 2026

Copy link
Copy Markdown
Member

there is a PR already.

@LamentXU123

Copy link
Copy Markdown
Member Author

Oh I see. Wasn't aware when I started to work on it.

@LamentXU123 LamentXU123 closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants