tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Recent tcnative null-dereference with 8.0.0-RC3 and 7.0.45 [tcnative-1.dll+0x7e23]
Date Thu, 03 Oct 2013 22:37:45 GMT

On 10/3/13 5:40 PM, Rainer Jung wrote:
> On 03.10.2013 21:52, Mark Thomas wrote:
>> On 03/10/2013 17:34, Christopher Schultz wrote:
>>> On 10/3/13 11:42 AM, Mark Thomas wrote:
>> I was thinking maybe an APR function that gave a textual error message
>> for a given error code. Currently, the APR Java code reports just the
>> error number. It would be nice to include a meaningful text message.
> The function is apr_strerror() and already wired via
> public static native org.apache.tomcat.jni.Error.strerror(int statcode)

There's also void tcn_ThrowAPRException(JNIEnv *e, apr_status_t err)
which throws an exception (actually, java.lang.Error) with the
appropriate error message.

I think it would be useful to have a TomcatNativeException instead of
throwing java.lang.Error or maybe even be smart about converting certain
error codes (e.g. APR_EOF) to Java exception types (e.g.

On the other hand, Mladen wants tcnative to be a thin wrapper around
APR, so maybe he doesn't want exceptions to be thrown directly from
native. I think if you're gonna use JNI, you may as well make it as nice
as possible.


View raw message