On Fri, 14 Nov 2025 12:08:05 GMT, Alan Bateman <[email protected]> wrote:
>> 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.
We do PUTPROP here
https://github.com/openjdk/jdk/blob/5d65c23cd99b72527dcfab9eb6da9510e7dc6330/src/java.base/share/native/libjava/System.c#L164
with 3rd parameter == NULL in this case.
PUTPROP checks for this so I do not see issues with this
https://github.com/openjdk/jdk/blob/5d65c23cd99b72527dcfab9eb6da9510e7dc6330/src/java.base/share/native/libjava/System.c#L68
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28317#discussion_r2527633331