#36727 [Opn->Csd]: needless bindValue make php core dump
| From: | tony2001@php.net | Date: | Fri, 17 Mar 2006 22:19:39 +0000 |
| Subject: | #36727 [Opn->Csd]: needless bindValue make php core dump | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-94485@lists.php.net to get a copy of this message | ||
ID: 36727
Updated by: tony2001@php.net
Reported By: valiak at gmail dot com
-Status: Open
+Status: Closed
Bug Type: PDO related
Operating System: linux
PHP Version: 5.1.2
New Comment:
This bug has been fixed in CVS.
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/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-03-14 13:39:56] valiak at gmail dot com
ce@ce:~/tmp$ /usr/local/php5.1-debug/bin/php test.php
Segmentation fault
ce@ce:~/tmp$ /usr/local/php5.1-debug/bin/php -v
PHP 5.1.3RC2-dev (cli) (built: Mar 14 2006 14:33:47) (DEBUG)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
------------------------------------------------------------------------
[2006-03-14 12:34:05] edink@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
[2006-03-13 22:56:16] valiak at gmail dot com
Description:
------------
simple script coredumps
the configure parameters are
./configure --disable-cgi --prefix=/usr/local/php5.1-debug
--with-pdo-pgsql --with-gd --with-gd-native-ttf --with-jpeg-dir
--with-png-dir --with-xpm-dir --with-zlib --with-pgsql
--with-freetype-dir --enable-debug
the coredump is
#0 _zend_is_inconsistent (ht=0x0, file=0x83a6da8
"/home/NETAGESOLUTIONS/ce/inst/php-5.1.2/Zend/zend_hash.c", line=847)
at /home/NETAGESOLUTIONS/ce/inst/php-5.1.2/Zend/zend_hash.c:53
#1 0x082b36a2 in zend_hash_find (ht=0x0, arKey=0x852f924 ":test",
nKeyLength=6, pData=0x0)
at /home/NETAGESOLUTIONS/ce/inst/php-5.1.2/Zend/zend_hash.c:847
#2 0x0811fffe in pgsql_stmt_param_hook (stmt=0x8530ad4,
param=0xbf855654, event_type=PDO_PARAM_EVT_ALLOC)
at
/home/NETAGESOLUTIONS/ce/inst/php-5.1.2/ext/pdo_pgsql/pgsql_statement.c:232
#3 0x081178f4 in really_register_bound_param (param=0xbf855654,
stmt=0x8530ad4, is_param=1)
at /home/NETAGESOLUTIONS/ce/inst/php-5.1.2/ext/pdo/pdo_stmt.c:330
#4 0x081184c1 in zif_PDOStatement_bindValue (ht=3,
return_value=0x8530e04, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /home/NETAGESOLUTIONS/ce/inst/php-5.1.2/ext/pdo/pdo_stmt.c:1503
#5 0x082c4dbd in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf855d60) at zend_vm_execute.h:192
#6 0x082c4372 in execute (op_array=0x85274ac) at zend_vm_execute.h:92
#7 0x082a7ce3 in zend_execute_scripts (type=8, retval=0x83a6da8,
file_count=3)
at /home/NETAGESOLUTIONS/ce/inst/php-5.1.2/Zend/zend.c:1101
#8 0x082666f2 in php_execute_script (primary_file=0xbf8581b4) at
/home/NETAGESOLUTIONS/ce/inst/php-5.1.2/main/main.c:1720
#9 0x08345f90 in main (argc=2, argv=0xbf8582f4) at
/home/NETAGESOLUTIONS/ce/inst/php-5.1.2/sapi/cli/php_cli.c:1077
Reproduce code:
---------------
<?
$dbh = new PDO('pgsql:dbname=test;host=localhost', 'xxxx', 'xxxx');
$stmt = $dbh->prepare('SELECT * FROM child');
$stmt->bindValue(':test', 1, PDO::PARAM_INT);
$stmt->execute();
?>
Expected result:
----------------
just nothing special - not to coredump, or some kind of error to
indicate that could not bind ":test"
Actual result:
--------------
ce@ce:~/tmp$ /usr/local/php5.1-debug/bin/php test.php
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36727&edit=1