ext/iconv/tests/bug48147.phpt: whitelist iconvs with //IGNORE#22552
Merged
Conversation
1b923cc to
58b5bdd
Compare
Contributor
Author
|
Force push / edit: I have been working on a test suite for iconv's POSIX conformance, and it has clarified my thinking. Regardless of what POSIX says about This doesn't meaningfully change anything, but I have updated the commit message and docs with a better explanation of the situation, and have switched the |
This test fails on musl, where iconv trips over the //IGNORE suffix. It is not obvious that //IGNORE is required to trigger the issue in the first place, but since we are ensuring that a security bug is fixed, it is better to include it where possible. This commit updates the test to append //IGNORE only on the two GNU iconv implementations that are known to support it. POSIX specifies its behavior, but leaves overall support optional.
58b5bdd to
8277a9e
Compare
Girgias
approved these changes
Jul 6, 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.
Fix the last failure in #22413
PHP has
ICONV_BROKEN_IGNOREfor implementations (glibc) that return anEILSEQwhen they//IGNOREan invalid sequence, but some implementations (musl) don't support//IGNOREat all, and this is allowed by a careful reading of theiconv_open()docs.Whatever libc does ultimately has to be OK. I think this needs better documentation (php/doc-en#5646) rather than more code.