On Mon, 8 May 2023 11:10:36 GMT, Maurizio Cimadamore <mcimadam...@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

Reply via email to