Edit report at https://bugs.php.net/bug.php?id=61292&edit=1

 ID:                 61292
 Updated by:         larue...@php.net
 Reported by:        julien at palard dot fr
 Summary:            Segfault while calling a method on an overloaded PDO
                     object.
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            PDO related
 Operating System:   Linux 2.6.32-amd64
 PHP Version:        5.4.0
-Assigned To:        
+Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2012-03-06 03:45:19] larue...@php.net

Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=323935
Log: Fixed bug #61292 (Segfault while calling a method on an overloaded PDO 
object)

------------------------------------------------------------------------
[2012-03-05 22:17:48] johan...@php.net

(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

------------------------------------------------------------------------
[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

Reply via email to