Bug #74456 [Ver->Csd]: Segmentation error while running a script in CLI mode

From: Date: Mon, 17 Apr 2017 12:27:32 +0000
Subject: Bug #74456 [Ver->Csd]: Segmentation error while running a script in CLI mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208620@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74456&edit=1 ID: 74456 Updated by: laruence@php.net Reported by: dumitru at floringabriel dot com Summary: Segmentation error while running a script in CLI mode -Status: Verified +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Debian 8 PHP Version: master-Git-2017-04-17 (Git) Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=d6315c2fbb46ea8795d2158e32c32f4111e805c1 Log: Fixed bug #74456 (Segmentation error while running a script in CLI mode) Previous Comments: ------------------------------------------------------------------------ [2017-04-17 09:33:54] nikic@php.net First valgrind warning: ==2631== Conditional jump or move depends on uninitialised value(s) ==2631== at 0xC8198F: zend_fetch_dimension_address_read (zend_execute.c:1710) ==2631== by 0xC8222C: zend_fetch_dimension_address_read_LIST (zend_execute.c:1827) ==2631== by 0xD0D23B: ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_HANDLER (zend_vm_execute.h:49253) ==2631== by 0xC8556F: execute_ex (zend_vm_execute.h:432) ==2631== by 0xC8580E: zend_execute (zend_vm_execute.h:474) ==2631== by 0xC18227: zend_execute_scripts (zend.c:1537) ==2631== by 0xB4FF8F: php_execute_script (main.c:2548) ==2631== by 0xD20FE0: do_cli (php_cli.c:997) ==2631== by 0xD22472: main (php_cli.c:1390) Dump: L0: V4 = FETCH_LIST array(...) int(0) L1: ASSIGN CV0($zero) V4 L2: V4 = FETCH_LIST V3 int(1) L3: ASSIGN CV1($one) V4 L4: V4 = FETCH_LIST V3 int(2) L5: ASSIGN CV2($two) V4 Clearly V3 was propagated into the FETCH_LIST, but only the first one... ------------------------------------------------------------------------ [2017-04-17 08:45:58] requinix@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2017-04-17 08:38:45] dumitru at floringabriel dot com Description: ------------ When running the following script a 'Segmentation fault' error is being displayed and the script is stoped. php -v PHP 7.1.3-3+0~20170325135815.21+jessie~1.gbpafff68 (cli) (built: Mar 25 2017 14:35:42) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.3-3+0~20170325135815.21+jessie~1.gbpafff68, Copyright (c) 1999-2017, by Zend Technologies Test script: --------------- <?php function small_numbers() { return [0,1,2]; } list ($zero, $one, $two) = small_numbers(); print_r(array_keys(get_defined_vars())); Expected result: ---------------- Segmentation fault Actual result: -------------- Array ( [0] => _GET [1] => _POST [2] => _COOKIE [3] => _FILES [4] => zero [5] => one [6] => two ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74456&edit=1

« previous php.bugs (#208620) next »