Bug #76594 [Opn->Fbk]: Bus Error due to unaligned access in zend_ini.c OnUpdateLong
Edit report at https://bugs.php.net/bug.php?id=76594&edit=1
ID: 76594
Updated by: cmb@php.net
Reported by: rainer dot jung at kippdata dot de
Summary: Bus Error due to unaligned access in zend_ini.c
OnUpdateLong
-Status: Open
+Status: Feedback
Type: Bug
Package: Reproducible crash
Operating System: Solaris Sparc 32 Bit
PHP Version: 7.3.0alpha3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Ah! While mbstring.strict_detection is not new, it has been
declared as long in PHP 7.2.7[1].
Rainer, please try with the attached patch.
[1] <https://github.com/php/php-src/blob/php-7.2.7/ext/mbstring/mbstring.h#L190>
Previous Comments:
------------------------------------------------------------------------
[2018-07-08 13:34:07] cmb@php.net
The following patch has been added/updated:
Patch Name: mbstring.strict_detection
Revision: 1531056846
URL: https://bugs.php.net/patch-display.php?bug=76594&patch=mbstring.strict_detection&revision=1531056846
------------------------------------------------------------------------
[2018-07-08 13:13:24] nikic@php.net
The issue is that mbstring.strict_detection uses OnUpdateLong instead of OnUpdateBool in https://github.com/php/php-src/blob/php-7.3.0alpha3/ext/mbstring/mbstring.c#L1503.
I don't think the option is new though.
------------------------------------------------------------------------
[2018-07-08 13:08:19] cmb@php.net
Thanks!
> I didn't find the code that sets mh_arg1 to 97 (decimal).
That appears to be an issue with the mbstring module globals[1].
Apparently, these are not properly aligned.
[1] <https://github.com/php/php-src/blob/php-7.3.0alpha3/ext/mbstring/mbstring.h#L139-L174>
------------------------------------------------------------------------
[2018-07-08 12:45:12] rainer dot jung at kippdata dot de
It does not happen for 7.2.7. I did not test any 7.3 alpha before.
Compiler is gcc 7.3.0.
Bus errors due to bad alignment are well-lknown on Solaris. I didn't find the code that sets
mh_arg1 to 97 (decimal).
------------------------------------------------------------------------
[2018-07-08 12:30:29] cmb@php.net
Is this a regression in PHP 7.3, or does it happen with earlier
versions also?
Which compiler do you use?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76594
--
Edit this bug report at https://bugs.php.net/bug.php?id=76594&edit=1
Thread (10 messages)