RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
Sam James
duke at openjdk.org
Thu Feb 8 04:44:02 UTC 2024
On Fri, 2 Feb 2024 15:49:59 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> I wrote earlier:
>>
>>> There is one change that merit highlighting: In src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c, I kept the dlsym lookup for openat64, fstatat64 and fdopendir64, on non-BSD OSes (i.e. Linux and AIX), and on AIX, respectively. This seems to me to be the safest choice, as we do not need to know if a lookup of openat would yield a 32-bit or a 64-bit version. (I frankly don't know, but I'm guessing it would yield the 32-bit version.)
>
> Basically, my understanding is that a call to "openat" in the source file will be converted into a call to openat64 on 32-bit platforms. When we look up the function using dlsym, I assume we need to find the 64-bit version directly.
>
> Even if this is incorrect, it seems at least *safe* to do it this way.
The redirection is done via aliases in the headers, so you're right. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1482403071
More information about the serviceability-dev
mailing list