RFR: 8338888: SystemDictionary::class_name_symbol has incorrect length check
Coleen Phillimore
coleenp at openjdk.org
Mon Aug 26 18:08:05 UTC 2024
On Mon, 26 Aug 2024 18:02:35 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> The name length check was incorrectly truncating the length to an int, which is wrong if the name is > `INT_MAX`. Added a test for this case to the existing test cases and fixed an issue with the call to `Exceptions::fthrow` that can hit the `INT_MAX` limitations of `os::vsnprintf` (this is the first in a serious of fixes that will mainly be done under [JDK-8328882](https://bugs.openjdk.org/browse/JDK-8328882) or subtasks thereof).
>>
>> Testing:
>> - updated test
>> - tiers 1-3 (sanity)
>>
>> Thanks
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20709#discussion_r1731615613
More information about the hotspot-runtime-dev
mailing list