RFR: JDK-8261167: print_process_memory_info add a close call after fopen [v2]

Matthias Baesken mbaesken at openjdk.java.net
Fri Feb 5 08:58:42 UTC 2021


On Fri, 5 Feb 2021 08:41:10 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add explicit NULL check and output in failure case
>
> Marked as reviewed by dholmes (Reviewer).

>I'm trying to recall if there was some discussion that these /proc open
>calls really can't fail hence the lack of checking ...

Hi  David,   those  other calls are checked but  just  in the style  if (fp)  { ... }
without the explicit NULL check .
For example 
https://github.com/openjdk/jdk/blob/78b0d3274200df6ad1063f26ce637c163dbd6ac8/src/hotspot/os/linux/os_linux.cpp#L1032

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

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


More information about the hotspot-runtime-dev mailing list