RFR: 8025922 JNI access to Strings need to check if the value field is non-null
Daniel D. Daugherty
daniel.daugherty at oracle.com
Fri Oct 4 07:16:36 PDT 2013
> webrev: http://cr.openjdk.java.net/~sla/8025922/webrev.00/
Thumbs up. This looks like good hardening/robustness for JNI.
src/share/vm/prims/jni.cpp
No comments.
src/share/vm/prims/jniCheck.cpp
No comments.
Dan
On 10/4/13 5:23 AM, Staffan Larsen wrote:
> If the String constructor has not completed, then we can't access the String value. It is still possible to do this from JNI, but it should not crash the VM.
>
> This was found while fixing a debugger issue (JDK-8021897) where stepping into the String constructor crashes the JVM. The fix for JDK-8021897 requires changes on the JDK side. Those changes will also include a JDI test for that issue, but won't be pushed until this change reaches jdk8-tl.
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8025922
> webrev: http://cr.openjdk.java.net/~sla/8025922/webrev.00/
>
> Thanks,
> /Staffan
More information about the hotspot-runtime-dev
mailing list