RFR (XS) 8199012: JVM crash during LevelDB JNI access
David Holmes
david.holmes at oracle.com
Thu Mar 8 11:44:03 UTC 2018
Can I get a second review please.
Thanks,
David
On 7/03/2018 9:31 AM, David Holmes wrote:
> webrev: http://cr.openjdk.java.net/~dholmes/8199012/webrev/
> bug: https://bugs.openjdk.java.net/browse/JDK-8199012
>
> JNI DetachCurrentThread is defined as a no-op if called by a thread that
> is not attached. But the check for that was occurring after we called
> VM_Exit::block_if_vm_exited(). If the thread was not in fact attached
> then we have a NULL current thread and that can cause in crash in
> VM_Exit::block_if_vm_exited() if we actually need to block - which
> explains the scenario reported in the bug.
>
> Simple, obvious, fix is to do the "not attached" check first.
>
> Testing:
> - Mach5 CI equivalent testing (tier1/2)
> - internal JNI tests
>
> I marked this noreg-hard as a regression test is difficult to set up due
> to the need to coordinate with a VM shutdown.
>
> Thanks,
> David
More information about the hotspot-runtime-dev
mailing list