|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-05-20 15:08 UTC] opitz dot alexander at googlemail dot com
Description: ------------ I'm running TYPO3 Unit tests with PHP7, which leads to this SIGSEGV while running the RequestBuilderTest. >>> Starting test 'TYPO3\CMS\Extbase\Tests\Unit\Mvc\Web\RequestBuilderTest::buildThrowsExceptionIfControllerConfigurationIsEmptyOrNotSet'. Segmentation fault <<< Running the test alone (and not all tests inside the file) works fine. Output of gdb Program received signal SIGSEGV, Segmentation fault. 0x000000000081e8ca in zif_current (execute_data=0x7fffef0191a0, return_value=0x7fffef0190d0) at /php7/ext/standard/array.c:953 953 RETURN_ZVAL_FAST(entry); (gdb) zbacktrace [0x7fffef0191a0] current(Es gibt kein Mitglied mit dem Namen ht. (gdb) backtrace #0 0x000000000081e8ca in zif_current (execute_data=0x7fffef0191a0, return_value=0x7fffef0190d0) at /php7/ext/standard/array.c:953 #1 0x00000000009e62e4 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER () at /php7/Zend/zend_vm_execute.h:692 #2 0x00000000009e5745 in execute_ex (ex=0x7fffef018900) at /php7/Zend/zend_vm_execute.h:394 #3 0x0000000000971df2 in zend_call_function (fci=0x7fffffffa490, fci_cache=0x7fffffffa460) at /php7/Zend/zend_execute_API.c:841 #4 0x00000000007bb533 in zim_reflection_method_invokeArgs (execute_data=0x7fffef018880, return_value=0x7fffef018580) at /php7/ext/reflection/php_reflection.c:3222 #5 0x00000000009e68f8 in ZEND_DO_FCALL_SPEC_HANDLER () at /php7/Zend/zend_vm_execute.h:821 #6 0x00000000009e5745 in execute_ex (ex=0x7fffef014030) at /php7/Zend/zend_vm_execute.h:394 #7 0x00000000009e585b in zend_execute (op_array=0x7fffef084000, return_value=0x0) at /php7/Zend/zend_vm_execute.h:434 #8 0x000000000098a1e5 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /php7/Zend/zend.c:1389 #9 0x00000000008f5666 in php_execute_script (primary_file=0x7fffffffcc40) at /php7/main/main.c:2479 #10 0x0000000000a56413 in do_cli (argc=4, argv=0x1384840) at /php7/sapi/cli/php_cli.c:967 #11 0x0000000000a575cb in main (argc=4, argv=0x1384840) at /php7/sapi/cli/php_cli.c:1334 Expected result: ---------------- No SIGSEGV Actual result: -------------- Crash with SIGSEGV PatchesZEND_HASH_FILL_END (last revision 2015-07-28 21:49 UTC by cmb@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
Snippet to crash PHP7. Without the unset, $var isn't changed and returns same content as before. If array is empty in the first assignment you get a notice that $var is an uninitialized var. <?php $configuration = array( 'controllerConfiguration' => array( 'TheFirstController' => array( ), ) ); $var = current(array_keys($configuration['controllerConfiguration'])); var_dump($var); unset($configuration['controllerConfiguration']['TheFirstController']); $configuration['controllerConfiguration'] = array(); $var = current(array_keys($configuration['controllerConfiguration'])); var_dump($var);