On Mon, 22 Dec 2025 13:55:20 GMT, Weijun Wang <[email protected]> wrote:

>> src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java
>>  line 64:
>> 
>>> 62:             int groupnum = getgroups(0, MemorySegment.NULL);
>>> 63:             if (groupnum == -1) {
>>> 64:                 throw new RuntimeException("getgroups returns " + 
>>> groupnum);
>> 
>> Not a must-have, but would be nice to have a FFM for `errno` to provide 
>> better diagnostics.
>
> Good idea. There is a `Linker.Option.captureCallState("errno")` feature and 
> I'll see how to use it.

It looks like there has been prior work with this, at least with macos, e.g.: 
src/java.base/macosx/classes/jdk/internal/ffi/generated/errno/errno_h.java

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2642257630

Reply via email to