On 01.10.2013 06:53, Mladen Turk wrote:
> On 09/30/2013 08:50 PM, Christopher Schultz wrote:
>> Mladen,
>>
>> Unless there is significant objection,
> 
> Yes there is.
> The transition from  Java to JNI costs 10 times then
> then a simple 'if (socket == OL)' in java
> 
>> I'd like to add such NULL checks
>> to limit JVM crashes in cases where the Java code isn't absolutely
>> perfect (with sincere apologies to all who manage the socket-management
>> code in Tomcat).
>>
> 
> -1. You are just hiding the reason for crash.
I hate these crashes too, but I'm agreeing with Mladen here, especially
if the native call does not return an error on such unexpected input
data and the error is not handled in Java land (logging, maybe more).

In cases where the crashes indicate that there was a data corruption
before, like a synchronization issue, we need to get aware of that.
Otherwise we might serve invalid results.

It would be nice though, if there were a simple validity check in Java
land, so that we could e.g. log an error if we encounter invalid data
and handle the error accordingly.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to