Repository navigation
ext/gd: fix imagecreate_error_oversized.phpt on 32-bit - #25423
Merged
devnexen merged 1 commit intoNov 12, 2026
Merged
Conversation
This was referenced Nov 12, 2026
Member
|
thanks for report but the additional 64 bits test is unnecessary. After its removal I ll merge. Cheers ! |
On 32-bit platforms 4294967296 is a float that doesn't fit in an int, so imagecreate() and imagecreatetruecolor() throw a TypeError before they check the range, and the test fails. It has failed in the LINUX_X32_DEBUG_ZTS job since it was added in 66c0f52. Remove that value from the test. The values that remain, PHP_INT_MAX and 2147483647, are valid ints on all platforms.
felixbuenemann
force-pushed
the
fix-gd-imagecreate-test-32bit
branch
from
November 12, 2026 15:52
1d9da89 to
87bd330
Compare
Contributor
Author
OK, 64-bit test removed. |
devnexen
approved these changes
Nov 12, 2026
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.
On 32-bit platforms
4294967296is a float that doesn't fit in an int, soimagecreate()andimagecreatetruecolor()throw aTypeErrorbefore they check the range, and the test fails. It has failed in the LINUX_X32_DEBUG_ZTS job since it was added in 66c0f52.Move that value to a test for 64-bit platforms. The values that remain,
PHP_INT_MAXand2147483647, are valid ints on all platforms.