From: smlerman at gmail dot com Operating system: Linux PHP version: 5.1.1 PHP Bug Type: PDO related Bug description: PDO crash
Description: ------------ PHP crashes on the following code. Changing the second named marker from :foo1 to :foo2 fixes the crash, which made me think it had to do with duplicate names. However, removing the where clause (leaving both name markers :foo1) also eliminates the crash, though the statement gets an error code of "HY093" (no full message). Reproduce code: --------------- <?php $db = new PDO("pgsql:host=localhost dbname=name user=user password=password"); $stmt = $db->prepare("UPDATE test SET foo1 = :foo1, foo2 = :foo1 WHERE foo1 = :id"); $stmt->bindParam(':foo1', $foo1); $stmt->bindParam(':foo2', $foo2); $stmt->bindParam(':id', $id); $foo1 = "foo"; $foo2 = "foo"; $id = "foo"; var_dump($stmt->errorInfo()); $stmt->execute(); ?> Expected result: ---------------- An error message of some kind if duplicate names aren't allowed, but certainly not a memory dump. Actual result: -------------- *** glibc detected *** php: free(): invalid next size (fast): 0x09980018 *** Followed by a backtrace and memory dump -- Edit bug report at http://bugs.php.net/?id=35604&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35604&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35604&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35604&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35604&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35604&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35604&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35604&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35604&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35604&r=support Expected behavior: http://bugs.php.net/fix.php?id=35604&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35604&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35604&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35604&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35604&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35604&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35604&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35604&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35604&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35604&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35604&r=mysqlcfg