Bug #61292 [Opn->Ver]: Segfault while calling a method on an overloaded PDO object.
| From: | johannes@php.net | Date: | Mon, 05 Mar 2012 22:17:48 +0000 |
| Subject: | Bug #61292 [Opn->Ver]: Segfault while calling a method on an overloaded PDO object. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168177@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61292&edit=1
ID: 61292
Updated by: johannes@php.net
Reported by: julien at palard dot fr
Summary: Segfault while calling a method on an overloaded PDO
object.
-Status: Open
+Status: Verified
Type: Bug
Package: PDO related
Operating System: Linux 2.6.32-amd64
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
(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
Previous Comments:
------------------------------------------------------------------------
[2012-03-05 16:58:24] 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 !
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61292&edit=1