RFR: 8277489: Rewrite JAAS UnixLoginModule with FFM [v5]

Weijun Wang weijun at openjdk.org
Sat Jan 3 18:47:54 UTC 2026


On Sat, 3 Jan 2026 18:15:47 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Have you tried `jextract` on AIX? Does the generated code have the same `FunctionDescriptor`?
>
> No, I don't have `jextract` for AIX, but I think @varada1110 does.
> The signature is `static int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **)` which essentially matches. (A possible problem may be that `uid_t` is unsigned, but we're treating it as `int`. However, the sign bit is 0 in my experiments. All parameters are passed in 64-bit registers in which `int` gets sign extended.)
> I have found `extern int _posix_getpwuid_r(uid_t, struct passwd *, char *, int, struct passwd **)` which takes an `int` for the buffer length and that functions works if I call it directly from Java (instead of the one above)!
> Calling it through my C wrapper which uses the `size_t` also works as already stated above.
> I think the AIX specific investigation could be done in a separate issue if the discussion is getting too long, here.

Or I can call this `_posix_getpwuid_r` function in an `if (isAix())` block.

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

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


More information about the build-dev mailing list