-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fixed crash of cases related to mbstring on Big_Endian platform(s390x) #3143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hmm, shouldn't that be fixed upstream? |
@cmb69 when you refer
But does not use as in the macro and pointer operations that causes the problem on big_endian platform |
Indeed, see kkos/oniguruma#86. Anyhow, it seems we need a slightly more general solution here, since the PR only caters to s390x, but Also, it is unclear whether the fix has to be applied to PHP-7.1, too. |
For master, we don't need a fix, since StateCheckNumType is unused as of Oniguruma 6.8.2. If the issue will not be fixed for PHP-7.1 for ABI compatibility reasons, it should not be fixed for PHP-7.2 for the same reasons. |
@cmb69 I'd say we can merge this into 7.1, because
|
If we take this PR literally, yes. However, other big endian platforms are likely affected as well, and a more general solution (PR #3277) has been rejected by Joe for being an ABI break. I do not agree with that, though. PS: see the related https://bugs.php.net/76183. |
Can you let me know if this PR will be merged or not? |
@sgolemon Since this PR targets PHP-7.2, what do you think? |
This PR fixes the 75863
Note
type
(StateCheckNumType) is defined as "short" (ext/mbstring/oniguruma/src/regint.h
),while "mem" is
int
,which causes the issue on Big_Endian platforms.
The solution: change
StateCheckNumType
asint
on s390x,and
ifdef
for safe on other platforms.