RFR: 8345422: Fix JNI Checker "in native method" warnings in the debug agent and debugger tests
Alex Menkov
amenkov at openjdk.org
Wed Dec 4 21:51:43 UTC 2024
On Wed, 4 Dec 2024 21:18:00 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> src/jdk.jdwp.agent/share/native/libjdwp/invoker.c line 342:
>>
>>> 340:
>>> 341: static void
>>> 342: saveGlobalRefHelper(JNIEnv *env, jobject obj, jobject *pobj)
>>
>> Do we need to call `saveGlobalRefHelper` instead of `saveGlobalRef `in `invokeNonvirtual`?
>
> I don't believe so because if an object is returned then that implies that there was no exception thrown.
It's the same like other calls here (invokeVirtual, etc), so I'd expect it produces "in native method" warning.
Maybe we don't have a test for this so this case is not detected?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22528#discussion_r1870326129
More information about the hotspot-runtime-dev
mailing list