RFR: JDK-8259843: initialize dli_fname array before calling dll_address_to_library_name
Lutz Schmidt
lucy at openjdk.java.net
Wed Jan 20 08:32:52 UTC 2021
On Wed, 20 Jan 2021 08:21:36 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> src/hotspot/share/runtime/frame.cpp line 543:
>>
>>> 541: bool found;
>>> 542:
>>> 543: if (buf == NULL || buflen < 1) return;
>>
>> Can this not just be an assert: buf != NULL && buflen > 0 ?
>
> Hi David, I think a return would be clearer but an assert is "better than nothing" .
>
> Best regards, Matthias
With an assert, you assume this is a "cannot occur error". You should be pretty sure to have good test coverage to find all "illegal invocations" before letting a release build escape into the wild.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2144
More information about the hotspot-dev
mailing list