RFR: 8336663: [JVMCI] VM Crash on ZGC due to incompatible handle returned by HotSpotJVMCIRuntime#getJObjectValue
Doug Simon
dnsimon at openjdk.org
Wed Jul 17 17:50:14 UTC 2024
On Wed, 17 Jul 2024 17:09:46 GMT, Tomáš Zezula <duke at openjdk.org> wrote:
> The `HotSpotJVMCIRuntime#getJObjectValue` method returns a real JNI local handle instead of a JVMCI handle to prevent random crashes on ZGC.
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java line 928:
> 926:
> 927: /**
> 928: * Gets the {@code jobject} value wrapped by {@code peerObject}. The returned "naked" value is
Remove `"naked"` since a JNI value is a proper handle and not really naked.
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java line 929:
> 927: /**
> 928: * Gets the {@code jobject} value wrapped by {@code peerObject}. The returned "naked" value is
> 929: * a JNI local reference, which is valid for the duration of a JVMCI shared library call. This
"which is valid for the duration of a JVMCI shared library call"
This is a bit ambiguous for a reader not fully aware of the dual JNI environments in play. One may think the call to this method is a "JVMCI shared library call". Can you express this some other way that doesn't make it sound like the return value is invalid?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20219#discussion_r1681431401
PR Review Comment: https://git.openjdk.org/jdk/pull/20219#discussion_r1681444856
More information about the hotspot-compiler-dev
mailing list