On 10/01/2013 07:32 PM, sebb wrote:
If a Java application succeeds in crashing the JVM, then IMO the JVM has a bug. I believe that all native code should strive to behave the same way.
This is conceptual difference. Most of those checks are done again inside Java. However inside JVM the Java API hides its native methods and ensures params are validated. Our API is Servlet spec and our VM is Tomcat. All the invalid data should be checked in java part which can be invalid as part of normal operation. Our native code already checks for some invalid data which can be invalid in such situations. OTOH invalid data passed to native caused by bug is just that, a bug. So fix the bug and you won't need the check. We can add compile time '#if defined(MAINTAINER_MODE) ... #endif' checks for easier debugging at development, but all the checks inside native method can be equally well coded before the actual JNI call and since our API is servlet and no use code can pass beyond that. Regards -- ^TM --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org