|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-21 12:47 UTC] mailinglists at if-core dot de
Description:
------------
The error "zend_mm_heap corrupted" and eventually a "Segmentation fault" error occurs when I try to use bindParam for a parameter which is commented out in the sql statement.
The error occurs only and then even not at all times if i use persistent connections
I reproduced the error on two servers, both running with PDO_OCI and persistent connections.
Reproduce code:
---------------
<?php
$user_id=1;
$dbh = new PDO('oci:dbname=//127.0.0.1:1521/xe;charset=AL32UTF8', 'xx', 'xx', array(PDO::ATTR_PERSISTENT => true));
$dbx = $dbh->prepare('
SELECT
id
FROM
user_data
/* ? */
');
$dbx->bindParam(1, $user_id);
$dbx->execute();
var_dump($dbx->fetchAll());
?>
Expected result:
----------------
An array with the contents of the Database-Table user_data
Actual result:
--------------
A blank page and errors in the error_log of the Apache Server.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
(gdb) bt #0 0x082f29af in zend_mm_check_ptr (heap=0x91261a8, ptr=0x929b6c8, silent=1, __zend_filename=0x840386c "/usr/local/bin/php-5.2.9/ext/pdo_oci/oci_driver.c", __zend_lineno=74, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/local/bin/php-5.2.9/Zend/zend_alloc.c:1299 #1 0x082f3f6a in _zend_mm_free_int (heap=0x91261a8, p=0x929b6c8, __zend_filename=0x840386c "/usr/local/bin/php-5.2.9/ext/pdo_oci/oci_driver.c", __zend_lineno=74, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/local/bin/php-5.2.9/Zend/zend_alloc.c:1938 #2 0x082f4f91 in _efree (ptr=0x929b6c8, __zend_filename=0x840386c "/usr/local/bin/php-5.2.9/ext/pdo_oci/oci_driver.c", __zend_lineno=74, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /usr/local/bin/php-5.2.9/Zend/zend_alloc.c:2306 #3 0x0813479c in _oci_error (err=0x927cf14, dbh=0x92395e8, stmt=0x9209d6c, what=0x8403c68 "OCIAttrGet: \"OCI_ATTR_STMT_TYPE\"", status=0, isinit=0, file=0x8403c30 "/usr/local/bin/php-5.2.9/ext/pdo_oci/oci_statement.c", line=125) at /usr/local/bin/php-5.2.9/ext/pdo_oci/oci_driver.c:74 #4 0x08136e36 in oci_stmt_execute (stmt=0x9209d6c) at /usr/local/bin/php-5.2.9/ext/pdo_oci/oci_statement.c:124 #5 0x0812c9e0 in zim_PDOStatement_execute (ht=0, return_value=0x92099b4, return_value_ptr=0x0, this_ptr=0x92099f0, return_value_used=0) at /usr/local/bin/php-5.2.9/ext/pdo/pdo_stmt.c:521 #6 0x0833731c in zend_do_fcall_common_helper_SPEC (execute_data=0xbfeb87e8) at /usr/local/bin/php-5.2.9/Zend/zend_vm_execute.h:200 #7 0x08337f3b in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfeb87e8) at /usr/local/bin/php-5.2.9/Zend/zend_vm_execute.h:322 #8 0x08336e9c in execute (op_array=0x9208d18) at /usr/local/bin/php-5.2.9/Zend/zend_vm_execute.h:92 #9 0x083122de in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/bin/php-5.2.9/Zend/zend.c:1134 #10 0x082c145c in php_execute_script (primary_file=0xbfebab64) at /usr/local/bin/php-5.2.9/main/main.c:2023 #11 0x0838d639 in main (argc=2, argv=0xbfebaca4) at /usr/local/bin/php-5.2.9/sapi/cli/php_cli.c:1133