ID: 33785
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Verified
Bug Type: PDO related
Operating System: gentoo linux
PHP Version: 5.1.0b3
Previous Comments:
------------------------------------------------------------------------
[2005-07-21 12:57:17] [EMAIL PROTECTED]
the cvs snapshot segfaults, too
here is a backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 28066)]
0xb6aecbcf in row_get_properties (object=0x0) at
/home/bs/workspace/src/php5-200507210630/ext/pd
o/pdo_stmt.c:2211
2211 for (i = 0; i < stmt->column_count; i++) {
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0xb6aecbcf in row_get_properties (object=0x0) at
/home/bs/workspace/src/php5-200507210630/ex
t/pdo/pdo_stmt.c:2211
#1 0xb6bd8bc6 in php_var_dump (struc=0x81a8ea8, level=1) at
/home/bs/workspace/src/php5-2005072
10630/ext/standard/var.c:139
#2 0xb6bd8fc5 in zif_var_dump (ht=1, return_value=0x81b91ac,
return_value_ptr=0x0, this_ptr=0x0
, return_value_used=0) at
/home/bs/workspace/src/php5-200507210630/ext/standard/var.c:192
#3 0xb6c60a75 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfba47e0) at zend_vm_execute.
h:184
#4 0xb6c60488 in execute (op_array=0x81b28e4) at zend_vm_execute.h:87
#5 0xb6c3c6c0 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/bs/workspace/
src/php5-200507210630/Zend/zend.c:1087
#6 0xb6c012bd in php_execute_script (primary_file=0xbfba6b50) at
/home/bs/workspace/src/php5-20
0507210630/main/main.c:1672
#7 0xb6cc85b7 in apache_php_module_main (r=0x819bc70,
display_source_mode=0) at /home/bs/worksp
ace/src/php5-200507210630/sapi/apache/sapi_apache.c:53
#8 0xb6cc9038 in send_php (r=0x819bc70, display_source_mode=0,
filename=0x0) at /home/bs/worksp
ace/src/php5-200507210630/sapi/apache/mod_php5.c:643
#9 0x080545f9 in ap_invoke_handler ()
#10 0x08067eae in ap_die ()
#11 0x0806803b in ap_process_request ()
#12 0x0805ee6c in ap_child_terminate ()
#13 0x0805f1bc in ap_child_terminate ()
#14 0x0805f2d3 in ap_child_terminate ()
#15 0x080604bc in ap_child_terminate ()
#16 0x080616fc in main ()
------------------------------------------------------------------------
[2005-07-20 21:34:41] [EMAIL PROTECTED]
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
Seems to work fine in CVS and valgrind does not reveal any hidden
memory corruption problems.
------------------------------------------------------------------------
[2005-07-20 12:51:16] [EMAIL PROTECTED]
the "exit;" was just for debugging, that's not what makes the script
halt ;) sorry for that
------------------------------------------------------------------------
[2005-07-20 12:50:24] [EMAIL PROTECTED]
Description:
------------
the code is self-explaining,
i am running mod_php 5.1.0b3 with apache 1.3.33 and postgresql 8.0.1
Reproduce code:
---------------
<pre><?php
$db = new PDO("pgsql:host=localhost dbname=foo user=bar password=''");
// need to select at least 2 rows to make it crash
$query = 'SELECT pcontact_id FROM pcontacts LIMIT 2';
// works fine
$s = $db->query($query);
$s->setFetchMode(PDO_FETCH_ASSOC);
foreach($s AS $row)
var_dump($s);
// segfaults
foreach($db->query($query, PDO_FETCH_LAZY) AS $row)
var_dump($row);
exit;
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33785&edit=1