#33915 [Asn->Csd]: Crash in _oci_close_session
| From: | tony2001@php.net | Date: | Thu, 08 Sep 2005 09:44:46 +0000 |
| Subject: | #33915 [Asn->Csd]: Crash in _oci_close_session | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84692@lists.php.net to get a copy of this message | ||
ID: 33915
Updated by: tony2001@php.net
Reported By: jfbustarret at tf1 dot fr
-Status: Assigned
+Status: Closed
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 5CVS-2005-08-02
Assigned To: tony2001
New Comment:
The bug has been fixed in OCI8 v.1.1, which is available in CVS HEAD
and PECL (use
pear install oci8-beta to install it).
Previous Comments:
------------------------------------------------------------------------
[2005-08-03 08:51:13] jfbustarret at tf1 dot fr
This new patch should be better :
diff -u php-5.0.4-orig/ext/oci8/oci8.c php
-5.0.4/ext/oci8/oci8.c
--- php-5.0.4-orig/ext/oci8/oci8.c 2005-07-27 20:24:40.000000000
+0
200
+++ php-5.0.4/ext/oci8/oci8.c 2005-08-02 09:33:55.000000000 +0200
@@ -2941,7 +2941,7 @@
oci_debug("START _oci_close_session: logging-off
sess=%d",session->num);
- if (session->is_open) {
+ if (session->pEnv && session->is_open) {
/* Temporary Service Context */
CALL_OCI_RETURN(OCI(error),
OCIHandleAlloc(
@@ -3032,12 +3032,13 @@
#ifdef HAVE_OCI_9_2
/* free environment handle (and fix bug #29652 with growing
.msb FD numb
er under weirdie Solarises) */
- CALL_OCI(
- OCIHandleFree(
- (dvoid *) session->pEnv,
- OCI_HTYPE_ENV
- )
- );
+ if (session->pEnv)
+ CALL_OCI(
+ OCIHandleFree(
+ (dvoid *) session->pEnv,
+ OCI_HTYPE_ENV
+ )
+ );
#endif
if (session->exclusive) {
------------------------------------------------------------------------
[2005-08-01 09:52:42] jfbustarret at tf1 dot fr
This bug is :
- time dependant,
- load dependant,
- random.
I certainly would not be able to find a piece of code that reproduces
the crash.
All I know is that _oci_close_session is called with session->server ==
NULL and that obviously crashes the function because it assumes that
session->server is a valid pointer.
------------------------------------------------------------------------
[2005-07-29 16:21:57] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2005-07-29 16:15:34] jfbustarret at tf1 dot fr
The bug exists with the CVS version of ext/oci8.
------------------------------------------------------------------------
[2005-07-29 09:56:15] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/33915
--
Edit this bug report at http://bugs.php.net/?id=33915&edit=1