RFR (S): 8238676: jni crashes on accessing it from process exit hook

David Holmes david.holmes at oracle.com
Wed Feb 19 02:04:54 UTC 2020


Bug: https://bugs.openjdk.java.net/browse/JDK-8238676
webrev: http://cr.openjdk.java.net/~dholmes/8238676/webrev/

If an application tries to use JNI from an atexit handler, the attempt 
can't succeed (the VM has already logically terminated) but it should 
not crash. The JNI Invocation API code was missing some checks in places 
and wasn't aware of the possibility of trying to make calls from the 
VMThread.

Testing:
  - new test added for the JNI Invocation API
  - tiers 1-3

Thanks,
David


More information about the hotspot-runtime-dev mailing list