#33970 [Opn->Fbk]: Seg fault when error should be returned
| From: | sniper@php.net | Date: | Tue, 02 Aug 2005 16:12:41 +0000 |
| Subject: | #33970 [Opn->Fbk]: Seg fault when error should be returned | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82828@lists.php.net to get a copy of this message | ||
ID: 33970
Updated by: sniper@php.net
Reported By: lists at cyberlot dot net
-Status: Open
+Status: Feedback
Bug Type: PDO related
Operating System: Fedora Core 3
PHP Version: 5.1.0b3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-08-02 17:40:59] lists at cyberlot dot net
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 this bug report at http://bugs.php.net/?id=33970&edit=1