From: bpd at keynetics dot com
Operating system: linux
PHP version: 5.2.1
PHP Bug Type: PDO related
Bug description: pdo_oci crash when freeing error text with persistent
connection
Description:
------------
A segmentation fault results when the pdo_oci driver receives an error
message from the oracle server.
Reproduce code:
---------------
<?php
try {
$pdo = new PDO("oci:dbname=instance", "bad_user", "bad_pass",
array(PDO::ATTR_PERSISTENT => true));
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
Expected result:
----------------
Caught exception: SQLSTATE[42S02]: pdo_oci_handle_factory: ORA-12154:
TNS:could not resolve the connect identifier specified
(/opt/php/src/ext/pdo_oci/oci_driver.c:462)
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1235028304 (LWP 19840)]
0xb6920a2f in free () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb6920a2f in free () from /lib/tls/i686/cmov/libc.so.6
#1 0x08212c8c in oci_handle_closer ()
#2 0x08213db1 in pdo_oci_handle_factory ()
#3 0x082068b1 in zim_PDO_dbh_constructor ()
#4 0x084978b9 in execute_internal ()
#5 0xb6589b51 in xdebug_execute_internal
(current_execute_data=0xbfaf1d40,
return_value_used=0, tsrm_ls=0x87b5038)
at /tmp/pear/cache/xdebug-2.0.0RC3/xdebug.c:1550
#6 0x0849810f in zend_do_fcall_common_helper_SPEC ()
#7 0x08498f87 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#8 0x08497bcb in execute ()
#9 0xb6589594 in xdebug_execute (op_array=0xb65f8d84, tsrm_ls=0x87b5038)
at /tmp/pear/cache/xdebug-2.0.0RC3/xdebug.c:1487
#10 0x08474758 in zend_execute_scripts ()
#11 0x08415e88 in php_execute_script ()
#12 0x084f920e in main ()
--
Edit bug report at http://bugs.php.net/?id=41043&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41043&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41043&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41043&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41043&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41043&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41043&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41043&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41043&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41043&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41043&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41043&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41043&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41043&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41043&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41043&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41043&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41043&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41043&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41043&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41043&r=mysqlcfg