RFR: 8333871: check sysinfo return values [v2]
David Holmes
dholmes at openjdk.org
Mon Nov 17 01:05:07 UTC 2025
On Fri, 14 Nov 2025 11:07:20 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> In the review of [JDK-8333522](https://bugs.openjdk.org/browse/JDK-8333522) it has been discussed that we might run into issues because of failing sysinfo.
>> However we miss checking the return values at some places, this might need adjustment.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> 0 - terminate not needed
I think this is completely unnecessary - `sysinfo` on Linux can't really fail, the only error possible is EFAULT if you pass a bad pointer for the struct - so don't do that.
Replacing numbers with words in the logging could break external parsing scripts.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28317#issuecomment-3539576209
More information about the hotspot-runtime-dev
mailing list