RFR: 8341722: Fix some warnings as errors when building on Linux with toolchain clang
Julian Waters
jwaters at openjdk.org
Wed Oct 9 07:28:58 UTC 2024
On Wed, 9 Oct 2024 06:25:07 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> src/jdk.hotspot.agent/linux/native/libsaproc/symtab.c line 393:
>>
>>> 391:
>>> 392: hcreate_r(htab_sz, symtab->hash_table);
>>> 393: // guarantee(rslt, "unexpected failure: hcreate_r");
>>
>> The commented out guarantee line references rslt. I'm not so sure why it was commented out, but it goes back to the initial load of the file 17 years ago. It looks like the correct thing to do if rslt is null is to "goto bad;" but that change is probably beyond the scope of this PR. Maybe file a new CR.
>
> Hi Chris , I created https://bugs.openjdk.org/browse/JDK-8341820 for the return value checking.
Might be a good idea to have rslt commented out rather than removed outright if we don't want to forget about it. guarantee on a variable that doesn't exist will be rather confusing to anyone reading through the code
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21407#discussion_r1793006705
More information about the core-libs-dev
mailing list