On Tue, 21 Apr 2026 07:27:24 GMT, Sergey Bylokhov <[email protected]> wrote:
> I wonder why this is not considered ffm bug. Since free/malloc/ and other > methods used via ffm bindings use different functions than the same jni > libraries, it is unclear why LD_PRELOAD does not affect ffm? This was already raised with FFM devs. It is behaving as designed. Docs on Linker were referenced to support this. I think it is this text. "In addition, a linker provides a way to look up foreign functions in libraries that conform to the ABI. Each linker chooses a set of libraries that are commonly used on the OS and processor combination associated with the ABI. For example, a linker for Linux/x64 might choose two libraries: libc and libm. The functions in these libraries are exposed via a [symbol lookup](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/Linker.html#defaultLookup())." Hence this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30811#issuecomment-4290996367
