RFR: 8333871: check sysinfo return values [v2]

Alan Bateman alanb at openjdk.org
Fri Nov 14 12:11:01 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

src/java.base/unix/native/libjava/java_props_md.c line 395:

> 393:             sprops.cpu_isalist = strdup(list);
> 394:         } else {
> 395:             sprops.cpu_isalist = NULL;

Would you mind checking the code that puts this in a system property can tolerate NULL? I don't suppose sysinfo will fail here (unless you found a case?) but it would be good to confirm that it won't blow up somewhere else.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28317#discussion_r2527272162


More information about the hotspot-runtime-dev mailing list