Skip to content

Skip createfromstring-overflow.phpt with external libgd >= 2.3.3 - #25857

Open
inode64 wants to merge 1 commit into
php:PHP-8.4from
inode64:fix-gd2-disabled-diagnostic
Open

inode64 wants to merge 1 commit into
php:PHP-8.4from
inode64:fix-gd2-disabled-diagnostic

Conversation

@inode64

@inode64 inode64 commented Nov 28, 2026

Copy link
Copy Markdown

The description below was drafted with an LLM (Claude Code, Claude Opus 5.5) and reviewed before posting.

createfromstring-overflow.phpt (added in b8c6387, GH-23953) fails when ext/gd is built against an external libgd 2.3.3: libgd 2.3.3 disables the legacy GD and GD2 formats by default (--enable-gd-formats), so imagecreatefromstring() emits an extra warning:

001+ Warning: imagecreatefromstring(): GD2 image support has been disabled
002+  in .../ext/gd/tests/createfromstring-overflow.php on line 29

Without GD2 support the test cannot exercise the INT_MAX chunk handling anyway. This skips it with the same condition the other GD2 tests have used since 0aaad46 ("Fix most external GD 2.3.3 compatibility"). Builds with the bundled libgd run the test as before.

Tested with PHP 8.4.28 and the system libgd 2.3.3 (Gentoo media-libs/gd, default configuration): FAIL before, SKIP after. Not tested with the bundled libgd, where the new SKIPIF condition is false.

We first worked around it in our Gentoo overlay by accepting the extra warning (https://github.com/inode64/inode64-overlay/blob/main/dev-lang/php/files/php-8.4-gd2-disabled-diagnostic.patch); skipping, as the other GD2 tests do, is simpler.

🤖 Generated with Claude Code

libgd 2.3.3 disables the legacy GD and GD2 formats by default
(--enable-gd-formats), so with such an external library
imagecreatefromstring() emits an extra "GD2 image support has been
disabled" warning and the test fails. It cannot exercise the INT_MAX
chunk handling there anyway. Skip it the same way as the other GD2
tests since 0aaad46 ("Fix most external GD 2.3.3 compatibility");
the test was added later, in b8c6387.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N8fTR5F9qkNs7QLgr6V3Ei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant