On Fri, 2 Jan 2026 15:35:49 GMT, Weijun Wang <[email protected]> wrote:
>> src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java
>> line 96:
>>
>>> 94: .downcallHandle(SYMBOL_LOOKUP.findOrThrow("getpwuid_r"),
>>> 95: FunctionDescriptor.of(C_INT, C_INT, C_POINTER,
>>> C_POINTER,
>>> 96: C_LONG, C_POINTER));
>>
>> `C_LONG` looks wrong for 32 bit platforms (arm 32). Note that `size_t` is
>> supported by `canonicalLayouts`.
>
> Do you see 64 bit?
> <img width="588" height="306" alt="Screenshot 2026-01-02 at 10 26 20"
> src="https://github.com/user-attachments/assets/82106d61-27f8-4871-a890-039971665e62"
> />
> There is no arm32 here so I assume it will be the `FallbackLinker`. The size
> will be returned by a JNI function `ffi_sizeof_long()`. No idea how it could
> go wrong.
Right, arm32 is using the `FallbackLinker`. `size_t` is mapped here:
https://github.com/openjdk/jdk/blob/2daf12edd24e641d4d7706d582994c2b3fe95e87/src/java.base/share/classes/jdk/internal/foreign/abi/fallback/FallbackLinker.java#L311
which takes it from here:
https://github.com/openjdk/jdk/blob/2daf12edd24e641d4d7706d582994c2b3fe95e87/src/java.base/share/classes/jdk/internal/foreign/abi/fallback/FFIType.java#L59
@bulasevich: You may want to try on arm32.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2657948890