|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-11-15 16:46 UTC] nikic@php.net
[2020-11-15 17:21 UTC] paternostersergio6 at gmail dot com
[2020-11-16 14:49 UTC] paternostersergio6 at gmail dot com
[2020-11-16 15:51 UTC] paternostersergio6 at gmail dot com
-Status: Open
+Status: Closed
[2020-11-16 15:51 UTC] paternostersergio6 at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 22:00:01 2025 UTC |
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