On Mon, 17 Nov 2025 01:02:42 GMT, David Holmes <[email protected]> wrote:

> 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.

Hi David , not sure how likely those failures are.  Back then in the review of 
[JDK-8333522](https://bugs.openjdk.org/browse/JDK-8333522)  we discussed the 
checking might be needed and that's why the JBS issue was created. 
Checking other projects for potential sysinfo failures it seems that the 'bad 
pointer' issue you referred to is indeed the most likely one.
But if it is really 'completely unnecessary' we should probably kick out the 
checks we do at a number of places in the codebase ?
https://github.com/search?q=repo%3Aopenjdk%2Fjdk+%22sysinfo%28%22&type=code

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

PR Comment: https://git.openjdk.org/jdk/pull/28317#issuecomment-3546401054

Reply via email to