RFR: 8327621: Check return value of uname in os::get_host_name [v2]

Thomas Stuefe stuefe at openjdk.org
Tue Mar 26 12:00:23 UTC 2024


On Tue, 26 Mar 2024 11:28:49 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Hi,
>> 
>> Trivial bug fix where we didn't check the return value of `uname(2)` on POSIX platforms. I checked callers of `get_host_name` and all wrap the calls in an `if` branch so they already handle failures.
>> 
>> Regards,
>> Johan
>
> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Perform correct check and log warning

Marked as reviewed by stuefe (Reviewer).

Looks good. I wonder though if we should something in case the hostname is truncated on output. Possibly in a separate RFR.

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

PR Review: https://git.openjdk.org/jdk/pull/18157#pullrequestreview-1960144716
PR Comment: https://git.openjdk.org/jdk/pull/18157#issuecomment-2020232095


More information about the hotspot-runtime-dev mailing list