[pull] master from php:master - #1176
Merged
Merged
Conversation
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
Fix tests using non canonical versions and improve existing tests. RFC: - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_double - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_integer - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_long - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_doubleval
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
This implement RFC: https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_metaphone_function which deprecate the metaphone function.
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
* PHP-8.5: Fix use-after-free when __clone() retains the stylesheet copy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )