|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-03-05 16:58 UTC] julien at palard dot fr
Description:
------------
Just check the simple code in the "Test script", it lead to the segfault.
Seems that it only segfault when ATTR_PERSISTENT is set.
Test script:
---------------
<?php
class Database_SQL extends PDO
{
function __construct()
{
$options = array(PDO::ATTR_PERSISTENT => TRUE);
parent::__construct("mysql:host=***;dbname=***;charset=utf8", '***', '***', $options);
}
var $bar = array();
public function foo()
{
var_dump($this->bar);
}
}
(new Melty_Database_SQL)->foo();
Expected result:
----------------
No segfault !
Actual result:
--------------
Segfault !
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 19:00:01 2025 UTC |
(gdb) bt #0 0x084de050 in zend_std_read_property (object=0x893ebcc, member=0x893d558, type=0, key=0x893d558) at branches/PHP_5_4/Zend/zend_object_handlers.c:433 #1 0x0857c5a9 in zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST ( execute_data=0x891f190) at branches/PHP_5_4/Zend/zend_vm_execute.h:21797 #2 0x0857c60e in ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER ( execute_data=0x891f190) at branches/PHP_5_4/Zend/zend_vm_execute.h:21815 #3 0x084ea3bb in execute (op_array=0x893d428) at branches/PHP_5_4/Zend/zend_vm_execute.h:410 #4 0x084a29c2 in dtrace_execute (op_array=0x893d428) at branches/PHP_5_4/Zend/zend_dtrace.c:75 #5 0x084eb8d4 in zend_do_fcall_common_helper_SPEC (execute_data=0x891f0d4) at branches/PHP_5_4/Zend/zend_vm_execute.h:669 #6 0x084ec3df in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x891f0d4) at branches/PHP_5_4/Zend/zend_vm_execute.h:752 #7 0x084ea3bb in execute (op_array=0x893b330) at branches/PHP_5_4/Zend/zend_vm_execute.h:410 #8 0x084a29c2 in dtrace_execute (op_array=0x893b330) at branches/PHP_5_4/Zend/zend_dtrace.c:75 #9 0x084b5d2d in zend_execute_scripts (type=8, retval=0x0, file_count=3) at branches/PHP_5_4/Zend/zend.c:1272 #10 0x0843e29a in php_execute_script (primary_file=0x80474b8) at branches/PHP_5_4/main/main.c:2473 #11 0x085ca879 in do_cli (argc=1, argv=0x8047804) at branches/PHP_5_4/sapi/cli/php_cli.c:983 #12 0x085cb8fb in main (argc=1, argv=0x8047804) at branches/PHP_5_4/sapi/cli/php_cli.c:1356