From: php at unfit dot org Operating system: Gentoo Linux PHP version: 5.1.4 PHP Bug Type: PDO related Bug description: PDO Exception Causes PHP Crash
Description: ------------ Core dump on PDO error. PDO error code if checked before execute is 'HY093'. Reproduce code: --------------- <?php //use actual database, user and password where applicable $dbh = new PDO('pgsql:host=127.0.0.1;dbname=foo', 'foo', 'foo'); $query = $dbh->prepare('INSERT INTO table (varA, varB, varC) VALUES ( :varA, :varB, :varC );'); $query->bindValue(':foo', 'foo'); $query->bindValue(':varC', 'foo'); $err = $query->errorCode(); echo "$err\n"; echo "you will see this.\n"; flush(); $query->execute(); /* CRASH POINT You will see only output that has been flushed. If running on the command line you will also see something like this: *** glibc detected *** malloc(): memory corruption: 0x16987018 *** Aborted (core dumped) */ echo "you won't see this.\n"; flush(); ?> Expected result: ---------------- HY093 you will see this. you won't see this. Actual result: -------------- HY093 you will see this. *** glibc detected *** malloc(): memory corruption: 0x16987018 *** Aborted (core dumped) -- Edit bug report at http://bugs.php.net/?id=38168&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38168&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38168&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38168&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38168&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38168&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38168&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38168&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38168&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38168&r=support Expected behavior: http://bugs.php.net/fix.php?id=38168&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38168&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38168&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38168&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38168&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38168&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38168&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38168&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38168&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38168&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38168&r=mysqlcfg