RFR (S) 6671508 - JNI GetPrimitiveArrayCritical should not be callable on object arrays

David Simms david.simms at oracle.com
Mon Jul 8 04:19:41 PDT 2013


|Please review a small fix:||

|http://cr.openjdk.java.net/~dsimms/6671508/ 
<http://cr.openjdk.java.net/%7Edsimms/6671508/>

Bug:

https://jbs.oracle.com/bugs/browse/JDK-6671508||
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6671508

|Summary of fix:||
||
     As noted in the bug, standard use of JNI does not protect the user 
from abusing the API (e.g. supplying incorrect arguments).
     The preferred method to discover such errors is via "checked JNI" 
(i.e. -Xcheck:jni).
     Added a further constant to "check_array()" to enforce primitive 
type array arg checking for Get/ReleasePrimativeArrayCritical.

     coleenp has already reviewed and okayed the fix (but is currently 
on vacation).
||
||Tests:||
||
     * JPRT
     * UTE "vm.quick.testlist"
     * JCK "vm_jni"
||
||Thanks||
||/David Simms||
||
|


More information about the hotspot-runtime-dev mailing list