Bug #80371 [NEW]: Sigfault on function call

From: Date: Sun, 15 Nov 2020 16:35:53 +0000
Subject: Bug #80371 [NEW]: Sigfault on function call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230369@lists.php.net to get a copy of this message
From: paternostersergio6 at gmail dot com Operating system: Ubuntu 16.04 Server PHP version: 8.0.0RC4 Package: Scripting Engine problem Bug Type: Bug Bug description:Sigfault on function call Description: ------------ I do apologize but this bug is too hard to reproduce outside of a complex framework I'm using. I hope the *backtrace* below could help. The segmentation fault happens when I call a static method in a class that just returns true. My (minimal) configuration. No particular changes in php.ini. sudo ./configure --prefix=/usr/local/php/8.0.0RC4 \ --with-pdo-mysql=mysqlnd \ --enable-debug Test script: --------------- /* Note this script works well! It is just to give you an idea of what happens in my framework */ class Process{ public static function isSpecial(string $customernumber) :bool{ // does some checks return true; } public static function addChannel( array $a) :array{ // THIS GENERATES THE SIGFAULT if( self::isSpecial($a['Customer Number']) ) $a['Channel'] = 'AB2'; else $a['Channel'] = 'AB1'; return $a; } } $a = []; $a['Customer Number'] = 'A100200'; $a = Process::addChannel($a); Actual result: -------------- GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 This GDB was configured as "x86_64-linux-gnu". Reading symbols from /usr/local/php/8.0.0RC4/bin/php...done. [New LWP 34435] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/local/php/8.0.0RC4/bin/php -q /home/edsradmin/apps.tmo/scripts/apps.tmo.ph'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000048a8bbbd in ?? () (gdb) bt #0 0x0000000048a8bbbd in ?? () #1 0x00007ffe5551c4c0 in ?? () #2 0x0000000048a4a4b7 in ?? () #3 0x00007f989bc001e0 in ?? () #4 0x00007f989bc14020 in ?? () #5 0x00000000027d9870 in ?? () #6 0x0000000000000006 in ?? () #7 0x00007ffe5551c390 in ?? () #8 0x000000000084d8b9 in zend_mm_alloc_small_slow (heap=0x7f989bc146f0, bin_num=0, __zend_filename=0xe1e00000000 <error: Cannot access memory at address 0xe1e00000000>, __zend_lineno=19025464, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /home/edsradmin/software/php-8.0.0RC4/Zend/zend_alloc.c:1194 #9 0x00000000009348a7 in zend_execute (op_array=0x7f989bc5e500, return_value=0x0) at /home/edsradmin/software/php-8.0.0RC4/Zend/zend_vm_execute.h:58789 #10 0x000000000088adbf in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/edsradmin/software/php-8.0.0RC4/Zend/zend.c:1680 #11 0x00000000007f00dc in php_execute_script (primary_file=0x7ffe5551ea80) at /home/edsradmin/software/php-8.0.0RC4/main/main.c:2490 #12 0x0000000000972b4e in do_cli (argc=6, argv=0x27c6780) at /home/edsradmin/software/php-8.0.0RC4/sapi/cli/php_cli.c:949 #13 0x0000000000973b2b in main (argc=6, argv=0x27c6780) at /home/edsradmin/software/php-8.0.0RC4/sapi/cli/php_cli.c:1336 -- Edit bug report at https://bugs.php.net/bug.php?id=80371&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80371&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80371&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80371&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80371&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80371&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80371&r=support Expected behavior: https://bugs.php.net/fix.php?id=80371&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80371&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80371&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80371&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80371&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80371&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80371&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80371&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80371&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80371&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80371&r=mysqlcfg

« previous php.bugs (#230369) next »