On Fri, 2 Jan 2026 13:08:35 GMT, Martin Doerr <[email protected]> wrote:
>> First, thank you so much for the experiments.
>>
>> Here, I think I follow the C checks in the old `Unix.c`:
>>
>> if (getpwuid_r(getuid(), &resbuf, pwd_buf, sizeof(pwd_buf), &pwd) == 0 &&
>> pwd != NULL) {
>>
>> How did it run in AIX?
>
> The old C code works on AIX. I haven't figured out what causes different
> behavior with the new code. Note that the new code works on linux on ppc64
> (big and little endian).
I tried on both macOS and Linux and `pwd.get(ValueLayout.ADDRESS, 0)` and
`resbuf` ended up having the same address. This is consistent to what the doc
requires. On the other hand, I tried to pass in a fake uid, the function
returned 0 and `pwd` pointed to null. If I ignore the check, my test program
crashed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2657743731