From:             lists at cyberlot dot net
Operating system: Fedora Core 3
PHP version:      5.1.0b3
PHP Bug Type:     PDO related
Bug description:  Seg fault when error should be returned

Description:
------------
Running this script seg faults instead of producing a reasonable error.

Reproduce code:
---------------
$dsn         = "mysql:dbname=123;host=localhost";
$dbuser          = "123";
$dbpass          = "123";


   class PDO_Dynamic extends PDO {
       private $dsn;
       private $dbuser;
       private $dbpass;

       function PDO_Dynamic($dsn, $dbuser, $dbpass) {
           $this->dsn = $dsn;
           $this->dbuser = $dbuser;
           $this->dbpass = $dbpass;
           $temp = $this->PDO($dsn, $dbuser, $dbpass);

       }

   }


   $db_read = new PDO_Dynamic($dsn, $dbuser, $dbpass);
   $db_write = new PDO_Dynamic($dsn, $dbuser, $dbpass.'-');


Expected result:
----------------
No error at all expected, or at least some sort of warning/fault

Actual result:
--------------
#0  0x08130533 in pdo_hash_methods (dbh=0x9e189b4, kind=0) at
/root/sources/php-5.1.0b3/ext/pdo/pdo_dbh.c:990
#1  0x081308bf in dbh_method_get (object_pp=0xbffb5294,
method_name=0x9e1baa4 "PDO", method_len=3) at
/root/sources/php-5.1.0b3/ext/pdo/pdo_dbh.c:1065
#2  0x0833f150 in ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER
(execute_data=0xbffb5270) at zend_vm_execute.h:14663
#3  0x08317eeb in execute (op_array=0x9e1b52c) at zend_vm_execute.h:87
#4  0x0831835b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbffb54a0) at zend_vm_execute.h:213
#5  0x08318a73 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbffb54a0) at zend_vm_execute.h:299
#6  0x08317eeb in execute (op_array=0x9e140ac) at zend_vm_execute.h:87
#7  0x082f19f9 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /root/sources/php-5.1.0b3/Zend/zend.c:1087
#8  0x082b0a9d in php_execute_script (primary_file=0xbffb78d0) at
/root/sources/php-5.1.0b3/main/main.c:1672
#9  0x0835ce9b in main (argc=2, argv=0xbffb79a4) at
/root/sources/php-5.1.0b3/sapi/cli/php_cli.c:1039


-- 
Edit bug report at http://bugs.php.net/?id=33970&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33970&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33970&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33970&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33970&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33970&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33970&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33970&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33970&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33970&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33970&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33970&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33970&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33970&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33970&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33970&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33970&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33970&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33970&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33970&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33970&r=mysqlcfg

Reply via email to