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

Matthias Baesken mbaesken at openjdk.java.net
Tue Jan 19 12:15:02 UTC 2021


On some platforms like bsd/mac, we call dll_address_to_library_name with a buffer parameter (e.g. char dli_fname[MAXPATHLEN]; ) that has uninitialized content.
This is usually no problem because dll_address_to_library_name fills the array, but on some codepaths it seems not to be the case.

See also this related sonar issue :
https://sonarcloud.io/project/issues?id=jdk&open=AXaE0drk8L9hkQskGEXZ&resolved=false&types=BUG

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

Commit messages:
 - JDK-8259843

Changes: https://git.openjdk.java.net/jdk/pull/2144/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2144&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259843
  Stats: 11 lines in 4 files changed: 6 ins; 0 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2144.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2144/head:pull/2144

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


More information about the hotspot-dev mailing list