[pull] master from php:master - #1174
Merged
Merged
Conversation
…set() (#23144) Originally found in #22268 (comment)
) IntlNumberRangeFormatter::createFromSkeleton() and IntlNumberRangeFormatter::format() did not reset intl error state. This commit fix it. I know this is yet another "error state" fixes. Unfortunately we couldn't use the function macro added before because these are methods, and we can only reset the error state manually so far. I personally hate the error state design. I think we should throw exceptions instead. But considering BC breaks... this is just an idea in the void. IntlNumberRangeFormatter is added in 8.6 so this is the correct branch.
In zend_compile.c, flags are stored in the lower bits of the Bucket address. If Bucket is aligned to 8 bytes, the lower three bits are always zero and this gives no problems. If the Bucket is not aligned, this results in non-obvious errors because the memory address and the flags overlap. This is difficult to debug when it happens, so add this assertion to make it more obvious what is wrong. The flags are ZEND_BIND_REF, ZEND_BIND_IMPLICIT, ZEND_BIND_EXPLICIT. Related to GH-19079
Comparing two deeply nested arrays recurses through zend_compare_arrays -> zend_compare_symbol_tables -> zend_hash_compare once per nesting level, and nothing bounds that recursion. zend_hash_compare() only guards against cycles, so a non-cyclic array a few tens of thousands of levels deep runs the C stack out and the process dies with a segfault. === crashes the same way through zend_is_identical(). Both now check the stack limit before descending and throw an Error instead, the same way zend_std_compare_objects() already handles the object case. Fixes GH-23088
* PHP-8.4: Add a stack limit check in zend_hash_compare() (#23090)
* PHP-8.5: Add a stack limit check in zend_hash_compare() (#23090)
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 : )