RFR: 8338888: SystemDictionary::class_name_symbol has incorrect length check
Thomas Stuefe
stuefe at openjdk.org
Tue Aug 27 13:23:03 UTC 2024
On Tue, 27 Aug 2024 07:59:17 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c line 53:
>>
>>> 51: char* c_name = malloc(len * sizeof(char));
>>> 52: if (c_name != NULL) {
>>> 53: memset(c_name, 0x59595959, len - 1); // YYYY...
>>
>> nit, `59` should be enough
>
> ?? you mean just 0x59? That would be zero extended to 0x00000059, which would not have the desired affect.
memset does cast the input int to unsigned char, so you get your YYY...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20709#discussion_r1732840970
More information about the hotspot-runtime-dev
mailing list