RFR: 8307615: Linker::nativeLinker should not be restricted (mainline)
Jorn Vernee
jvernee at openjdk.org
Mon May 8 12:22:16 UTC 2023
On Mon, 8 May 2023 11:10:36 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> Port of: https://git.openjdk.org/panama-foreign/pull/831
src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java line 78:
> 76: SharedUtils.checkSymbol(symbol);
> 77: return downcallHandle(function, options).bindTo(symbol);
> 78: }
This doesn't look quite right, as `downcallHandle` is being called twice? (forgot to push?).
I suggest calling `Reflection::ensureNativeAccess` immediately in each overload, and then delegating to `downcallHandle0` which doesn't check the access.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13863#discussion_r1187378482
More information about the core-libs-dev
mailing list