Skip to content

[pull] master from php:master - #1257

Merged
pull[bot] merged 3 commits into
turkdevops:masterfrom
php:master
Sep 9, 2026
Merged

[pull] master from php:master#1257
pull[bot] merged 3 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Sep 9, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

php_dom_xpath_callbacks_dtor() freed php_ns and each namespaces entry while
leaving registry->php_ns and registry->namespaces pointing at them, and it
then destroyed node_list, which runs node destructors. A destructor calling
gc_collect_cycles() therefore reached php_dom_xpath_callback_ns_get_gc()
through the still-set fields and iterated freed memory. Reachable from
userland by calling DOMXPath::__construct() a second time on an object that
has php:function registrations and a populated node list.

Closes GH-23621
* PHP-8.4:
  dom: clear the xpath callback registrations before freeing them
* PHP-8.5:
  dom: clear the xpath callback registrations before freeing them
@pull pull Bot locked and limited conversation to collaborators Sep 9, 2026
@pull pull Bot added the ⤵️ pull label Sep 9, 2026
@pull
pull Bot merged commit 980a5de into turkdevops:master Sep 9, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant