RFR: 8345422: Fix JNI Checker "in native method" warnings in the debug agent and debugger tests
Chris Plummer
cjplummer at openjdk.org
Wed Dec 4 04:55:38 UTC 2024
On Wed, 4 Dec 2024 02:07:13 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> The root cause of [JDK-8344804](https://bugs.openjdk.org/browse/JDK-8344804) seems to be some JNI Checker warnings. I decided to resolve all the warnings in the debug agent and debugger tests that start with "in native method". This seems to have resolved [JDK-8344804](https://bugs.openjdk.org/browse/JDK-8344804) failure. There are still other JNI Checker warnings present that are not being dealt with at this time.
>>
>> Testing:
>> - [x] All tier1
>> - [x] All tier2 svc tests
>> - [x] All tier3 svc tests
>> - [x] All tier4, which is where [JDK-8344804](https://bugs.openjdk.org/browse/JDK-8344804) reproduced
>> - [x] All tier5 svc tests
>
> src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c line 56:
>
>> 54: JNI_FUNC_PTR(env,ExceptionClear)(env); // keep -Xcheck:jni happy
>> 55: ERROR_MESSAGE(("JNI Exception occurred calling Module.getName()"));
>> 56: EXIT_ERROR(AGENT_ERROR_JNI_EXCEPTION, NULL);
>
> Don't you want to report what the exception was?
That might be nice, but we don't do it in other places where we have this pattern. This call should never fail, thus the "fatal error" approach.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22528#discussion_r1868716747
More information about the hotspot-runtime-dev
mailing list