pajoye Tue Jul 22 06:51:00 2008 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/pdo_oci/tests bug44301.phpt
Modified files:
/php-src NEWS
/php-src/ext/pdo_oci oci_statement.c
Log:
- MFH: Segfault when an exception is thrown on persistent connections
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.210&r2=1.2027.2.547.2.965.2.211&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.210
php-src/NEWS:1.2027.2.547.2.965.2.211
--- php-src/NEWS:1.2027.2.547.2.965.2.210 Mon Jul 21 17:35:50 2008
+++ php-src/NEWS Tue Jul 22 06:50:59 2008
@@ -232,6 +232,8 @@
(Andrey)
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
(frode at coretrek dot com, Nuno)
+- Fixed bug #44301 (Segfault when an exception is thrown on persistent
connections).
+ (Martin Jansen)
- Fixed bug #44257 (timelib_tz_lookup_table must use float for gmtoffset).
(Derick, iuri dot fiedoruk at hp dot com).
- Fixed bug #44214 (Crash using preg_replace_callback() and global variable).
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_oci/oci_statement.c?r1=1.16.2.10.2.7.2.2&r2=1.16.2.10.2.7.2.3&diff_format=u
Index: php-src/ext/pdo_oci/oci_statement.c
diff -u php-src/ext/pdo_oci/oci_statement.c:1.16.2.10.2.7.2.2
php-src/ext/pdo_oci/oci_statement.c:1.16.2.10.2.7.2.3
--- php-src/ext/pdo_oci/oci_statement.c:1.16.2.10.2.7.2.2 Mon Jul 21
17:35:50 2008
+++ php-src/ext/pdo_oci/oci_statement.c Tue Jul 22 06:50:59 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci_statement.c,v 1.16.2.10.2.7.2.2 2008/07/21 17:35:50 pajoye Exp $ */
+/* $Id: oci_statement.c,v 1.16.2.10.2.7.2.3 2008/07/22 06:50:59 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -87,7 +87,7 @@
}
if (S->einfo.errmsg) {
- efree(S->einfo.errmsg);
+ pefree(S->einfo.errmsg, stmt->dbh->is_persistent);
S->einfo.errmsg = NULL;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_oci/tests/bug44301.phpt?view=markup&rev=1.1
Index: php-src/ext/pdo_oci/tests/bug44301.phpt
+++ php-src/ext/pdo_oci/tests/bug44301.phpt
--TEST--
PDO OCI Bug #44301 (Segfault when an exception is thrown on persistent
connections)
--SKIPIF--
<?php
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not
loaded');
require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc';
PDOTest::skip();
?>
--FILE--
<?php
putenv("PDO_OCI_TEST_ATTR=" . serialize(array(PDO::ATTR_PERSISTENT => true)));
require 'ext/pdo/tests/pdo_test.inc';
$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
try {
$stmt = $db->prepare('SELECT * FROM no_table');
$stmt->execute();
} catch (PDOException $e) {
print $e->getMessage();
}
$db = null;
--EXPECTF--
SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view
does not exist
(%s/ext/pdo_oci/oci_statement.c:%d)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php