php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42942 pdo_pgsql: segfault with multiple rows and prepared statements
Submitted: 2007-10-12 09:14 UTC Modified: 2008-05-20 01:00 UTC
From: php at benjaminschulz dot com Assigned: pajoye (profile)
Status: No Feedback Package: PDO related
PHP Version: 5CVS-2007-10-12 (CVS) OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at benjaminschulz dot com
New email:
PHP Version: OS:

 

 [2007-10-12 09:14 UTC] php at benjaminschulz dot com
Description:
------------
Hi,
i can't provide reproduce code. All i can say is that i use prepared statements with multiple rows (INSERT .. VALUES (..), (...)) and on a table with huge data php segfaults.
If executed with 100 rows per Statement PHP fails with "zend_mm_heap corrupted", this core was created with 20 rows. The rows contain binary data and are all about 1-3mb.

Here is the backtrace, i hope it helps:

Core was generated by `php -q index.php'.
Program terminated with signal 11, Segmentation fault.
#0  _zend_mm_free_int (heap=0x85971f8, p=<value optimized out>) at /usr/src/php5/Zend/zend_alloc.c:1932
1932            if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0  _zend_mm_free_int (heap=0x85971f8, p=<value optimized out>) at /usr/src/php5/Zend/zend_alloc.c:1932
#1  0x082cecac in zend_hash_destroy (ht=0x876b210) at /usr/src/php5/Zend/zend_hash.c:531
#2  0x082c4ab7 in _zval_dtor_func (zvalue=0x86f6724) at /usr/src/php5/Zend/zend_variables.c:43
#3  0x082b8e09 in _zval_ptr_dtor (zval_ptr=0xbfe86b94) at /usr/src/php5/Zend/zend_variables.h:35
#4  0x082f101a in zend_do_fcall_common_helper_SPEC (execute_data=0xbfe88cc0) at /usr/src/php5/Zend/zend_execute.h:155
#5  0x082e23a8 in execute (op_array=0x869c9e0) at /usr/src/php5/Zend/zend_vm_execute.h:87
#6  0x082c4de4 in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3) at /usr/src/php5/Zend/zend.c:1134
#7  0x08282d70 in php_execute_script (primary_file=0xbfe8b098) at /usr/src/php5/main/main.c:2006
#8  0x083431d7 in main (argc=3, argv=0xbfe8b1b4) at /usr/src/php5/sapi/cli/php_cli.c:1140


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-12 17:38 UTC] pajoye@php.net
Can you try again with php 5.2.6? or 5.3 snaps?
 [2008-05-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 15:01:36 2024 UTC