PHP 4.0 Bug #9659: sapi servlet crashes when exceptions thrown in java code
| From: | alt at gimp dot org | Date: | Fri, 09 Mar 2001 17:34:25 +0000 |
| Subject: | PHP 4.0 Bug #9659: sapi servlet crashes when exceptions thrown in java code | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48428@lists.php.net to get a copy of this message | ||
From: alt@gimp.org
Operating system: Linux RH 6.1
PHP version: 4.0 Latest CVS (09/03/2001)
PHP Bug Type: Unknown/Other Function
Bug description: sapi servlet crashes when exceptions thrown in java code
./configure --with-java --with-servlet
Sun JVM (also happens with IBM JVM).
Java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
sapi_servlet_ub_write() and other native methods should
check for java exceptions when calling java methods.
The call to
(*jenv)->CallVoidMethod(jenv, servlet, write, arg);
should really be followed by :-
{
jthrowable exc;
exc = (*jenv)->ExceptionOccurred(jenv);
if (exc) {
(*jenv)->ExceptionClear(jenv);
}
}
or similar with reporting capabilities.
(When I applied this patch it seemed to fix the exception problem).
--
Edit Bug report at: http://bugs.php.net/?id=9659&edit=1