Bug #76594 [Fbk->Opn]: Bus Error due to unaligned access in zend_ini.c OnUpdateLong

From: Date: Sun, 08 Jul 2018 22:39:05 +0000
Subject: Bug #76594 [Fbk->Opn]: Bus Error due to unaligned access in zend_ini.c OnUpdateLong
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216238@lists.php.net to get a copy of this message
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: Feedback +Status: Open Type: Bug Package: Reproducible crash Operating System: Solaris Sparc 32 Bit PHP Version: 7.3.0alpha3 Assigned To: cmb Block user comment: N Private report: N New Comment: Thanks for the confirmation, and for filing the bug report in the first place! Previous Comments: ------------------------------------------------------------------------ [2018-07-08 22:30:42] rainer dot jung at kippdata dot de Confirmed, the patch fixes it. Great job, thanks a lot! ------------------------------------------------------------------------ [2018-07-08 13:34:47] cmb@php.net 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> ------------------------------------------------------------------------ [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> ------------------------------------------------------------------------ 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

« previous php.bugs (#216238) next »