Bug #76183 [Fbk->Ver]: 3 Coredumps when running make test on Solaris 11.4/SPARC
| From: | cmb@php.net | Date: | Thu, 05 Apr 2018 13:36:24 +0000 |
| Subject: | Bug #76183 [Fbk->Ver]: 3 Coredumps when running make test on Solaris 11.4/SPARC | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214617@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76183&edit=1
ID: 76183
Updated by: cmb@php.net
Reported by: stadtkind2 at gmx dot de
Summary: 3 Coredumps when running make test on Solaris
11.4/SPARC
-Status: Feedback
+Status: Verified
Type: Bug
Package: Reproducible crash
Operating System: Solaris 11.4 Beta SPARC
PHP Version: 7.2.4
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks again!
> Hint: __s390x__ is not defined on Solaris/SPARC :)
I have expected that. I suggest to move further discussion to
<https://github.com/php/php-src/pull/3143>.
Previous Comments:
------------------------------------------------------------------------
[2018-04-05 13:15:39] stadtkind2 at gmx dot de
@cmb
Changing 'typedef short int StateCheckNumType' to 'typedef int
StateCheckNumType' works fine. No more core dumps when running the php-7.2.4 ext/mbstring
tests.
Hint: __s390x__ is not defined on Solaris/SPARC :)
------------------------------------------------------------------------
[2018-04-05 10:54:33] cmb@php.net
Thanks for further testing!
Apparently, the coredump issue has been resolved in Oniguruma in
the meantime. We prefer not to update bundled libraries in stable
PHP branches, so we'd have to apply a patch for PHP-7.2 (and maybe
PHP-7.1). According to PR 3143[1],
StateCheckNumType would have
to be defined as int on big endian platforms at least. It is
still defined as short int[2] in Oniguruma 6.8.1, but is unused
as of <https://github.com/kkos/oniguruma/commit/e2e9677>
(I'd
rather not apply this commit, though, since it is tagged as
refactoring).
Could you please try if changing the typedef would solve the issue
for you with PHP 7.2(.4)?
[1] <https://github.com/php/php-src/pull/3143>
[2] <https://github.com/kkos/oniguruma/blob/v6.8.1/src/regint.h#L713>
------------------------------------------------------------------------
[2018-04-05 07:53:54] stadtkind2 at gmx dot de
Ok, I made some compiler tweaks (building with -xmemalign=16i) and now I don't get coredumps (I
also build php-7.2.4 with memalign=16i and I still get coredumps there) anymore:
$ TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php run-tests.php ext/mbstring/tests/*.phpt
...
=====================================================================
Number of tests : 343 339
Tests skipped : 4 ( 1.2%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 2 ( 0.6%) ( 0.6%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 337 ( 98.3%) ( 99.4%)
---------------------------------------------------------------------
Time taken : 35 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #43301 (mb_ereg*_replace() crashes when replacement string is invalid PHP expression and
'e' option is used) [ext/mbstring/tests/bug43301.phpt]
Test mb_get_info() function [ext/mbstring/tests/mb_get_info.phpt]
=====================================================================
------------------------------------------------------------------------
[2018-04-05 06:48:56] stadtkind2 at gmx dot de
@cmb
Multibyte regex (oniguruma) version 6.3.0
I'm not getting very far with php-src master (coredumps near the end of gmake all) though :(
...
Generating phar.php
gmake: *** [Makefile:444: ext/phar/phar.php] Bus Error (core dumped)
gmake: *** Deleting file 'ext/phar/phar.php'
program terminated by signal BUS (invalid address alignment)
Current function is OnUpdateLong
671 *p = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value));
(dbx) where
=>[1] OnUpdateLong(entry = 0xa00000684deaaa30, new_value = 0x200000684dd87160, mh_arg1 = 0xad,
mh_arg2 = 0x1ffc11e901f8c0, mh_arg3 = (nil), stage = 1), line 671 in "zend_ini.c"
[2] zend_register_ini_entries(ini_entry = 0x1ffc11e8e68e40, module_number = 15), line 269 in
"zend_ini.c"
[3] zm_startup_mbstring(type = 1, module_number = 15), line 1567 in "mbstring.c"
[4] zend_startup_module_ex(module = 0x800000684dde1410), line 1905 in "zend_API.c"
[5] zend_startup_module_zval(zv = 0xb00000684dd94610), line 1920 in "zend_API.c"
[6] zend_hash_apply(ht = 0x1ffc11e901c498, apply_func = 0x1ffc11e8a10f20 =
&phpzend_API.c`zend_startup_module_zval(zval *zv)), line 1617 in
"zend_hash.c"
[7] zend_startup_modules(), line 2031 in "zend_API.c"
[8] php_module_startup(sf = 0x1ffc11e8e48df0, additional_modules = (nil), num_additional_modules =
0), line 2170 in "main.c"
[9] php_cli_startup(sapi_module = 0x1ffc11e8e48df0), line 431 in "php_cli.c"
[10] main(argc = 14, argv = 0xa00000684dd85a90), line 1371 in "php_cli.c"
(dbx) print *new_value
*new_value = {
gc = {
refcount = 1U
u = {
type_info = 454U
}
}
h = 9223372036854953429U
len = 1U
val = "0"
}
------------------------------------------------------------------------
[2018-04-04 13:17:43] cmb@php.net
Thanks for reporting this issue! It might be a duplicate of bug
#75863.
Which version of Oniguruma do you use (check phpinfo())?
Could you also please try to compile a current PHP master[1], with
the bundled oniguruma?
[1] <https://github.com/php/php-src>
------------------------------------------------------------------------
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=76183
--
Edit this bug report at https://bugs.php.net/bug.php?id=76183&edit=1