From: stadtkind2 at gmx dot de
Operating system: Solaris 11.3
PHP version: 7.1.2
Package: Reproducible crash
Bug Type: Bug
Bug description:SIGBUS in zend_bitset_in on 64bit Solaris/SPARC
Description:
------------
Hi,
I'm getting a SIGBUS when using a 64bit (32bit code is fine) php7 on
Solaris 11.3/SPARC when opcache is enabled:
$ grep opcache php.ini | grep -v ^\;
[opcache]
zend_extension=opcache.so
opcache.enable=1
opcache.enable_cli=1
$ php -v
PHP 7.1.2 (cli) (built: Mar 2 2017 13:34:05) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.2, Copyright (c) 1999-2017, by Zend
Technologies
$ cat hallo.php
<?php
echo "Hallo Welt\n";
$ php hallo.php
Bus error(coredump)
$ dbx .../php core
(dbx) where
current thread: t@1
=>[1] zend_bitset_in(set = 0xfffffdee7912f904, n = 0), line 89 in
"zend_bitset.h"
[2] zend_worklist_push(worklist = 0xfffffdee7912f938, i = 0), line 109
in "zend_worklist.h"
[3] zend_cfg_identify_loops(op_array = 0xfffff9fb9e473008, cfg =
0xfffff9fb9e494028, flags = 0xfffff9fb9e494024), line 769 in
"zend_cfg.c"
[4] zend_dfa_analyze_op_array(op_array = 0xfffff9fb9e473008, ctx =
0xfffffdee7912fb80, ssa = 0xfffff9fb9e494028, flags =
0xfffff9fb9e494024), line 70 in "dfa_pass.c"
[5] zend_optimize_script(script = 0xfffff9fb9e473000,
optimization_level = 2147467263, debug_level = 0), line 977 in
"zend_optimizer.c"
[6] cache_script_in_shared_memory(new_persistent_script =
0xfffff9fb9e473000, key = 0xc583fc0cb0 "/tmp/hallo.php", key_length =
14U, from_shared_memory = 0xfffffdee7912fe40), line 1273 in
"ZendAccelerator.c"
[7] persistent_compile_file(file_handle = 0xfffffdee79130c28, type =
8), line 1865 in "ZendAccelerator.c"
[8] zend_execute_scripts(type = 8, retval = (nil), file_count = 3, ...
= 0x19e45c668, ...), line 1469 in "zend.c"
[9] php_execute_script(primary_file = 0xfffffdee79130c28), line 2537
in "main.c"
[10] do_cli(argc = 4, argv = 0xc583fbd3f0), line 993 in "php_cli.c"
[11] main(argc = 4, argv = 0xc583fbd3f0), line 1381 in "php_cli.c"
Test script:
---------------
Fetch the C code from
https://gist.github.com/skrueger8/8f1adc353e2e700de47f9ec5b6561573
$ uname -a
SunOS solaris 5.11 11.3 sun4v sparc sun4v
$ cc -V
cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
$ cc -m64 -Wall -Werror -g -std=c11 test.c && ./a.out
work->visited = ffffffff7ffff4b4
Bus error(coredump)
$ cc -m32 -Wall -Werror -g -std=c11 test.c && ./a.out
work->visited = ffbff5cc
--
Edit bug report at https://bugs.php.net/bug.php?id=74199&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74199&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74199&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74199&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74199&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74199&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74199&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74199&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74199&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74199&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74199&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74199&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74199&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74199&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74199&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74199&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74199&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74199&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74199&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74199&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74199&r=mysqlcfg