Bug #79599 [NEW]: coredump in set_error_handler

From: Date: Fri, 15 May 2020 05:36:08 +0000
Subject: Bug #79599 [NEW]: coredump in set_error_handler
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227039@lists.php.net to get a copy of this message
From: thedinosaurmail at gmail dot com Operating system: ubuntu 16.04 PHP version: 7.4.6 Package: *General Issues Bug Type: Bug Bug description:coredump in set_error_handler Description: ------------ the set_error_handler will coredump in NTS DEBUG MODE the stack __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff5d45801 in __GI_abort () at abort.c:79 #2 0x00007ffff5d3539a in __assert_fail_base (fmt=0x7ffff5ebc7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5555563ed9f0 "(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))", file=file@entry=0x5555563ed960 "/root/php-src/Zend/zend_hash.c", line=line@entry=965, function=function@entry=0x5555563edee0 <__PRETTY_FUNCTION__.13579> "_zend_hash_index_add_or_update_i") at assert.c:92 #3 0x00007ffff5d35412 in __GI___assert_fail (assertion=0x5555563ed9f0 "(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))", file=0x5555563ed960 "/root/php-src/Zend/zend_hash.c", line=965, function=0x5555563edee0 <__PRETTY_FUNCTION__.13579> "_zend_hash_index_add_or_update_i") at assert.c:101 #4 0x0000555555ba2bdb in _zend_hash_index_add_or_update_i (ht=0x7fffee6593c0, h=0, pData=0x555556978ac0 <executor_globals>, flag=18) at /root/php-src/Zend/zend_hash.c:965 #5 0x0000555555ba3170 in zend_hash_next_index_insert (ht=0x7fffee6593c0, pData=0x555556978ac0 <executor_globals>) at /root/php-src/Zend/zend_hash.c:1078 #6 0x0000555555c5dcba in ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_CV_HANDLER () at /root/php-src/Zend/zend_vm_execute.h:46211 #7 0x0000555555c69ebf in execute_ex (ex=0x7fffee614020) at /root/php-src/Zend/zend_vm_execute.h:57578 #8 0x0000555555c6a466 in zend_execute (op_array=0x7fffee682300, return_value=0x0) at /root/php-src/Zend/zend_vm_execute.h:57922 #9 0x0000555555b8d2b4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-src/Zend/zend.c:1666 #10 0x0000555555aee5b4 in php_execute_script (primary_file=0x7fffffffd0f0) at /root/php-src/main/main.c:2617 #11 0x0000555555c6d070 in do_cli (argc=2, argv=0x55555697d570) at /root/php-src/sapi/cli/php_cli.c:961 #12 0x0000555555c6e232 in main (argc=2, argv=0x55555697d570) at /root/php-src/sapi/cli/php_cli.c:1356 it may relate the commit of https://github.com/php/php-src/commit/a588b825d6f243935911e58591d4072ca5bcbcfb#diff-3054389ad750ce9a9f5895cd6d27800fR2222 and Test script: --------------- <?php set_error_handler(function(){ throw new \Exception(); }); function test(){ $a[] = $b; } try{ test(); }catch(\Exception $e){ echo "catch"; } Expected result: ---------------- it will catch and print "catch" Actual result: -------------- __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. -- Edit bug report at https://bugs.php.net/bug.php?id=79599&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79599&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79599&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79599&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79599&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79599&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79599&r=support Expected behavior: https://bugs.php.net/fix.php?id=79599&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79599&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79599&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79599&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79599&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79599&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79599&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79599&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79599&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79599&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79599&r=mysqlcfg

« previous php.bugs (#227039) next »