RFR(s): 8247248: JVM TI might create JNI locals in another thread when using handshakes.
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Tue Jun 9 18:30:18 UTC 2020
Hi Robbin,
Nice catch!
The fix looks good in general.
I'd be nice to add comments to explain why these global refs are created.
Thanks,
Serguei
On 6/9/20 09:15, Robbin Ehn wrote:
> Hi all,
>
> If the direct handshake is executed by the target thread, the JNI
> local(s) are created in that thread but returned in the handshaking
> thread.
> They thus are not safe to use. (thread might even have exited by this
> point)
>
> Code:
> http://cr.openjdk.java.net/~rehn/8247248/v1/webrev/
>
> Unfortunately there is no way the distinguish a local jobject vs a
> global. Which makes it hard to track when the jobject is global and not.
>
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8247248
>
> Local testing of JDI/JVMTI and t1-5.
> (no real crash so there is nothing to reproduce)
>
> Thanks, Robbin
More information about the serviceability-dev
mailing list