[pull] master from php:master#1073
Merged
Merged
Conversation
The switch in phpdbg_print_breakpoints() assigned str_type per case and jumped to a shared label that immediately recomputed the same value from brake->type, making the pre-goto assignments dead. Set str_type directly per case instead and drop the goto.
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.
The charset names used in this test are implementation-specific, and in particular are not known to musl. This causes musl to fall back to utf8, in which the input string is not actually invalid, leading to a failed test. The input string is already invalid in ASCII however, so we solve the general problem by using ASCII as the to/from charset unless the ICONV_IMPL is known to support the originals.
* PHP-8.2: [skip ci] Fix CXXFLAGS for type verification build
* PHP-8.3: [skip ci] Fix CXXFLAGS for type verification build
* PHP-8.4: [skip ci] Fix CXXFLAGS for type verification build
* PHP-8.5: [skip ci] Fix CXXFLAGS for type verification build
This test does a byte comparison of the expected ISO-2022-JP encoding with the result of iconv(). The ISO-2022-JP encoding, however, is stateful; there are many ways to arrive at a correct answer. Musl is known to have an inefficient encoding that causes it to fail this test, so we add a SKIPIF for the "unknown" iconv implementation that musl has. Nothing is wrong here per se, but to support the musl output (and that of other iconvs), an expert would need to verify it.
This test checks the output of iconv_mime_encode() with a target charset of ISO-2022-JP. That charset is stateful, though, and there are many ways to arrive at a correct answer. Musl has an inefficient encoding of it that causes this to fail because the actual output differs from (and is much longer than) the expected output. We add a SKIPIF for the "unknown" iconv implementation that musl has.
* PHP-8.4: ext/iconv/tests/iconv_mime_encode.phpt: skip for "unknown" iconv ext/iconv/tests/eucjp2iso2022jp.phpt: skip for "unknown" iconv
* PHP-8.5: ext/iconv/tests/iconv_mime_encode.phpt: skip for "unknown" iconv ext/iconv/tests/eucjp2iso2022jp.phpt: skip for "unknown" iconv
…arious extensions (#21724) There are various extensions in the php code base that includes ext/hash/php_hash for the php_hash_bin2hex method. While these method is actually simple, we can make them as APIs in the zend engine to remove the dependence on ext/hash/ This commit added the needed APIs (zend_bin2hex and zend_bin2hex_str). A follow-up PR will be made in the future to replace the usage of ext/hash with the added APIs.
I didn't get a merge conflict here so assumed it was fine.
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 : )