Skip to content

[pull] master from php:master - #1176

Merged
pull[bot] merged 33 commits into
turkdevops:masterfrom
php:master
Aug 10, 2026
Merged

[pull] master from php:master#1176
pull[bot] merged 33 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Aug 10, 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 : )

iliaal and others added 30 commits August 10, 2026 10:06
sxe_objects_compare dereferenced document->ptr when both nodes were
NULL without checking document. A subclass that skips parent
__construct leaves document NULL, so $a == $b segfaulted. Compare the
documents only when both are set; anything else is uncomparable.

Closes GH-23067
* PHP-8.4:
  Fix segfault comparing uninitialized SimpleXMLElement instances
* PHP-8.5:
  Fix segfault comparing uninitialized SimpleXMLElement instances
…g fails.

When formatFormattableRange() failed, the error was set (which throws, as
exceptions are force-enabled there) but execution fell through to
intl_charFromString(), which returns NULL for the bogus result, and the NULL
zend_string ended up in return_value as an IS_STRING zval. The engine then
dereferenced it while discarding the return value.

The conversion is now only attempted for a successful formatting and both
failure paths return early.

createFromSkeleton() had the same shape of defect without the crash: the
skeleton failure path threw and then still built a
LocalizedNumberRangeFormatter out of the failed skeleton, so it bails out
early as well.

Additionally, format() reset the global error slot and the object one
separately, and both methods reset before parsing their parameters, so a
TypeError also cleared the state. Use intl_errors_reset(), which covers both
slots, and reset once the parameters are known to be good.

Close GH-23198
Removes the hard-coded -j2 from Windows CI so run-tests.php selects the worker count automatically
* PHP-8.2:
  CI: Select Windows test workers automatically (#22946)
* PHP-8.3:
  CI: Select Windows test workers automatically (#22946)
* PHP-8.4:
  CI: Select Windows test workers automatically (#22946)
* PHP-8.5:
  CI: Select Windows test workers automatically (#22946)
Let's prevent writing 4095 and 4096 as a magic number, its indeed confusing,
instead use ZEND_MAP_PTR_CHUNK_MASK and ZEND_MAP_PTR_CHUNK_SIZE
This API is far worse than just using the existing zend_parse_arg_TYPE() APIs.

A SourceGraph search [1] shows this API is effectively only used by ext/ds to which a PR migrating away from this API has been submitted. [2]
The other two usages are from a now deprecated extension [3] and @arnauld-lb's now longer maintained php-go project. [4]

As such we think it is reasonable to remove said API.

[1] https://sourcegraph.com/search?q=context:global+-f:zend_API.c+-f:zend_API.h+zend_parse_parameter%28&patternType=keyword&sm=0
[2] php-ds/ext-ds#232
[3] https://github.com/libvips/php-vips-ext
[4] https://github.com/arnaud-lb/php-go
importStylesheet() clones the stylesheet document and hands the copy to
libxslt, which owns it and frees it together with the stylesheet. The
clone goes through zend_objects_clone_members(), so a DOMDocument
subclass __clone() can retain the copy, or a node proxy into it, and
dereference freed memory once the processor is destroyed. Require the
clone to be exclusively owned before libxslt takes it.

Closes GH-23199
* PHP-8.4:
  Fix use-after-free when __clone() retains the stylesheet copy
@pull pull Bot locked and limited conversation to collaborators Aug 10, 2026
@pull pull Bot added the ⤵️ pull label Aug 10, 2026
@pull
pull Bot merged commit c383b8c into turkdevops:master Aug 10, 2026
1 of 3 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.

7 participants