[foreign-memaccess+abi] RFR: 8266814: Improve library loading with SymbolLookup abstraction [v3]
jvernee at openjdk.java.net
Tue May 11 10:13:36 UTC 2021
On Mon, 10 May 2021 16:57:31 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> This patch implements the library loading abstraction described in:
>> That is, a functional interface called `SymbolLookup`, and a couple of factories to get a lookup for a given classloader, and to get a *system* lookup, useful to lookup C symbols.
>> To implement the system lookup, we load `msvcrt.dll` on Windows, while we build and load an empty library (which depends on libc) on Mac/Linux. This approach is better than relying on RTLD_DEFAULT (which can sometimes leak symbols from libraries loaded independently). Also, doing this bypasses the problem of figuring out the location of libc, which, on Linux system is particularly gnarly, because of the multi-arch support.
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> Address review comments
Marked as reviewed by jvernee (Committer).
More information about the panama-dev