RFR: 8336529: (fs) UnixFileAttributeViews setTimes() failing on armhf, Ubuntu noble [v3]
Alan Bateman
alanb at openjdk.org
Sun Jul 21 07:35:39 UTC 2024
On Fri, 19 Jul 2024 09:02:00 GMT, Vladimir Petko <vpetko at openjdk.org> wrote:
>> src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 265:
>>
>>> 263: return ret;
>>> 264: }
>>> 265: #endif
>>
>> I assume you will move to after statx_wrapper and just replace the body with a simply if-then-else.
>
> I should also add ARM32 guard in addition to linux. This will limit impact further and i can use if/else
>
> This if/else will not work in a general case, even in Debian where x86_64 arch has 64 bit time_t but no __futimens64 function, so without an arch specific guard I have to lookup 64 bit one and, if it fails, fall back to a general symbol.
>
> ````
> $objdump -T /lib/x86_64-linux-gnu/libc.so.6 | grep futimens
> 000000000011a3e0 w DF .text 000000000000002c GLIBC_2.6 futimens
>
> $objdump -T /lib/arm-linux-gnueabihf/libc.so.6 | grep futimens
> 000a7f58 w DF .text 00000080 GLIBC_2.6 futimens
> 000a7f30 g DF .text 00000028 GLIBC_2.34 __futimens64
Starting out with this limited to ARM32 is okay, it reduces the risk as this code is compiled to many platforms and with many different toolchains. Can you move it after statx_wrapper as right now it is a bit annoying to have in the middle of the XXX_wrapper functions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20208#discussion_r1685670195
More information about the nio-dev
mailing list