RFR: 8338888: SystemDictionary::class_name_symbol has incorrect length check
David Holmes
dholmes at openjdk.org
Mon Aug 26 20:52:07 UTC 2024
On Mon, 26 Aug 2024 18:04:27 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c line 67:
>>
>>> 65: return JNI_TRUE;
>>> 66: }
>>> 67: return JNI_FALSE;
>>
>> You don't free the class name so that the memory is available to the error message? Maybe a comment would be useful here and below.
>
> Since the test is run with othervm, the memory should be reclaimed with the process exit. Probably no comment needed since I think we can't run native code without othervm.
We can run native code without othervm but I switched to othervm both for the logging and to make it more likely we would not be short on memory.
The malloc'd name is used to construct the error message but not used as part of the error message so can be freed once the JNI call is complete.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20709#discussion_r1731809856
More information about the hotspot-runtime-dev
mailing list