|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-10-20 16:39 UTC] patrickallaert@php.net
Description: ------------ PHP 5.4 / trunk segfault while using phpunit. It only happens with one specific test, however, it looks like that test content is not relevant at all, emptying its content or putting a "die" at the end of that test avoid the segfault. It must happen in the phpunit code after the execution of that test. Tested using trunk @rev 318251 See the backtrace which is more relevant. Actual result: -------------- (gdb) bt #0 0x0000000000922721 in ZEND_SEND_VAL_SPEC_CONST_HANDLER (execute_data=0x7fcee7305910) at /home/patrick.allaert/Projets/php- src/Zend/zend_vm_execute.h:2361 #1 0x0000000000919b46 in execute (op_array=0x7fcee5293f78) at /home/patrick.allaert/Projets/php-src/Zend/zend_vm_execute.h:410 #2 0x00000000008dbb61 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/patrick.allaert/Projets/php-src/Zend/zend.c:1272 #3 0x0000000000852760 in php_execute_script (primary_file=0x7ffff390c1a0) at /home/patrick.allaert/Projets/php-src/main/main.c:2414 #4 0x0000000000a25095 in do_cli (argc=6, argv=0x7ffff390c548) at /home/patrick.allaert/Projets/php-src/sapi/cli/php_cli.c:983 #5 0x0000000000a25fad in main (argc=6, argv=0x7ffff390c548) at /home/patrick.allaert/Projets/php-src/sapi/cli/php_cli.c:1356 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
<?php class SegfaultTest extends PHPUnit_Framework_TestCase { protected $handler; public function setUp() { try { $this->handler = new PDO( "sqlite::memory:" ); $this->handler->sqliteCreateFunction( 'md5', array( 'ezcQuerySqliteFunctions', 'md5Impl' ), 1 ); } catch ( PDOException $e ) { $this->markTestSkipped( 'PDO session could not be created: ' . $e->getMessage() ); } } public function tearDown() { unset( $this->handler ); } public function testOne() { } public function testTwo() { } }Dmitry, could you take a look at it? Looks like something is wrong with that caching thingie in the executor.. (gdb) f 0 #0 ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER (execute_data=0x7ffff7f9d1c0) at /local/qa/5_4_valgrind/Zend/zend_vm_execute.h:28949 28949 if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { (gdb) p *execute_data.fbc $10 = {type = 90 'Z', common = {type = 90 'Z', function_name = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, scope = 0x5a5a5a5a5a5a5a5a, fn_flags = 1515870810, prototype = 0x5a5a5a5a5a5a5a5a, num_args = 1515870810, required_num_args = 1515870810, arg_info = 0x5a5a5a5a5a5a5a5a}, op_array = {type = 90 'Z', function_name = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, scope = 0x5a5a5a5a5a5a5a5a, fn_flags = 1515870810, prototype = 0x5a5a5a5a5a5a5a5a, num_args = 1515870810, required_num_args = 1515870810, arg_info = 0x5a5a5a5a5a5a5a5a, refcount = 0x5a5a5a5a5a5a5a5a, opcodes = 0x5a5a5a5a5a5a5a5a, last = 1515870810, vars = 0x5a5a5a5a5a5a5a5a, last_var = 1515870810, T = 1515870810, brk_cont_array = 0x5a5a5a5a5a5a5a5a, last_brk_cont = 1515870810, try_catch_array = 0x5a5a5a5a5a5a5a5a, last_try_catch = 1515870810, static_variables = 0x5a5a5a5a5a5a5a5a, this_var = 1515870810, filename = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, line_start = 1515870810, line_end = 1515870810, doc_comment = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, doc_comment_len = 1515870810, early_binding = 1515870810, literals = 0x5a5a5a5a5a5a5a5a, last_literal = 1515870810, run_time_cache = 0x5a5a5a5a5a5a5a5a, last_cache_slot = 1515870810, reserved = {0x5a5a5a5a5a5a5a5a, 0x5a5a5a5a5a5a5a5a, 0x5a5a5a5a5a5a5a5a, 0x5a5a5a5a5a5a5a5a}}, internal_function = {type = 90 'Z', function_name = 0x5a5a5a5a5a5a5a5a <Address 0x5a5a5a5a5a5a5a5a out of bounds>, scope = 0x5a5a5a5a5a5a5a5a, fn_flags = 1515870810, prototype = 0x5a5a5a5a5a5a5a5a, num_args = 1515870810, required_num_args = 1515870810, arg_info = 0x5a5a5a5a5a5a5a5a, handler = 0x5a5a5a5a5a5a5a5a, module = 0x5a5a5a5a5a5a5a5a}}