RFR: JDK-8259843: initialize dli_fname array before calling dll_address_to_library_name

Matthias Baesken mbaesken at openjdk.java.net
Wed Jan 20 11:09:46 UTC 2021


On Wed, 20 Jan 2021 08:42:23 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> 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.
>
> +1 for the assert.
> If you are worried about release, combine assert with release check:
> assert(buf && buflen > 1, "sanity");
> if (buf == NULL || buflen < 1) return;
> Its what I usually do if I want to be super thorough.
> Sorry for the bikeshedding :)

Hi Thomas, I like your suggestion ; David are you fine with it ?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2144


More information about the hotspot-dev mailing list