|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-01-17 23:19 UTC] nikic@php.net
[2018-01-17 23:21 UTC] nikic@php.net
-Status: Open
+Status: Duplicate
[2018-01-17 23:21 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 06:00:01 2025 UTC |
Description: ------------ Pretty simple to reproduce. Happens only when the variable is not initialized first. Also sometimes requires two or three invocations until it first crashes, no idea why. Needs opcache.enable_cli=1 of course to reproduce. Does not happen on 7.1.13. Also happens on other OSes (e.g. Ubuntu 14/16, with self-built PHP). Test script: --------------- <?php function foo() { @$bar++; } foo(); Actual result: -------------- $ gdb php-7.2.1/bin/php (gdb) run -dzend_extension=opcache.so -dopcache.enable_cli=1 sigsegv72.php Starting program: php-7.2.1/bin/php -dzend_extension=opcache.so -dopcache.enable_cli=1 sigsegv72.php [New Thread 0x1703 of process 46816] warning: unhandled dyld version (15) Thread 2 received signal SIGSEGV, Segmentation fault. 0x0000000100636c5b in execute_ex (ex=0x101222030) at Zend/zend_vm_execute.h:59726 59726 if (UNEXPECTED((ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) != 0)) { (gdb) bt #0 0x0000000100636c5b in execute_ex (ex=0x101222030) at Zend/zend_vm_execute.h:59726 #1 0x0000000100636e6a in zend_execute (op_array=0x10127b600, return_value=0x0) at Zend/zend_vm_execute.h:63763 #2 0x00000001005cdc92 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at Zend/zend.c:1496 #3 0x0000000100520932 in php_execute_script (primary_file=0x7ffeefbff318) at main/main.c:2590 #4 0x00000001006f3d9d in do_cli (argc=4, argv=0x7ffeefbffa40) at sapi/cli/php_cli.c:1011 #5 0x00000001006f2d2c in main (argc=4, argv=0x7ffeefbffa40) at sapi/cli/php_cli.c:1404