ext/standard: Fix range() calculated size in HT_MAX_SIZE ValueError#22513
Open
arshidkv12 wants to merge 2 commits into
Open
ext/standard: Fix range() calculated size in HT_MAX_SIZE ValueError#22513arshidkv12 wants to merge 2 commits into
arshidkv12 wants to merge 2 commits into
Conversation
…essage ext/standard: Fix range() calculated size in HT_MAX_SIZE ValueError message ext/standard: Fix range() calculated size in HT_MAX_SIZE ValueError message ext/standard: Fix range() calculated size in HT_MAX_SIZE ValueError message
1d5ec35 to
5bec8b8
Compare
devnexen
reviewed
Jun 29, 2026
| --TEST-- | ||
| GH-22505 : range() reports the correct calculated size when exceeding HT_MAX_SIZE | ||
| --INI-- | ||
| memory_limit=20G |
Member
There was a problem hiding this comment.
is this test actually run on CI ??
Contributor
Author
There was a problem hiding this comment.
I think, it is running. range(0, (1 << 30)) code needed minimum 17G.
devnexen
reviewed
Jun 29, 2026
| "The supplied range exceeds the maximum array size: start=" ZEND_LONG_FMT " end=" ZEND_LONG_FMT " step=" ZEND_LONG_FMT, end, start, (_step)); \ | ||
| "The supplied range exceeds the maximum array size by %" PRIu64 " elements: " \ | ||
| "start=" ZEND_LONG_FMT ", end=" ZEND_LONG_FMT ", step=" ZEND_LONG_FMT ". " \ | ||
| "Calculated size: %" PRIu64 ". Maximum size: %" PRIu64 ".", \ |
Contributor
Author
There was a problem hiding this comment.
I changed the error message to match the master branch. I think maintenance is easier now.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#22507