RFR (S) 8043224: -Xcheck:jni improvements to exception checking and excessive local refs

David Simms david.simms at oracle.com
Thu May 15 11:55:18 UTC 2014


Bug: https://bugs.openjdk.java.net/browse/JDK-8043224

Web review: http://cr.openjdk.java.net/~dsimms/8043224/

Check JNI:

1) Functions that require exception checks now set a flag. JNI exception 
checks clear said flag. Functions which do not allow exceptions now 
check the flag and warn if the programmer has failed to check for 
exceptions. Said flag is actually the name of the function requiring an 
exception check.

2) JNI function exit now check and warn if the number of local reference 
exceed the "planned number of references", i.e exceed initial frame 
capacity, "pushlocalframe" capacity or "ensurelocalcapacity".

Testing:

  * jtreg, quick vm tests
  * Hand rolled test run locally (no support of JNI in test libs...will
    hold until there is support).


Cheers
/David Simms


More information about the hotspot-runtime-dev mailing list