On Thu, 26 Oct 2023 18:07:24 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> Explicitly handle UpcallStub allocation failures by terminating. We 
>> currently might try to use the returned `nullptr` which would fail sooner or 
>> later. This patch just makes the termination explicit.
>
> Jorn Vernee has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Throw OOME for allocation failures

src/java.base/share/classes/java/lang/foreign/Linker.java line 532:

> 530:      * @throws IllegalArgumentException if an invalid combination of 
> linker options is given.
> 531:      * @throws IllegalCallerException If the caller is in a module that 
> does not have native access enabled.
> 532:      * @throws OutOfMemoryError if the runtime does not have the memory 
> needed to create the downcall handle.

Suggestions for the phrasing here are welcome. I think we should use something 
that works for both downcall handles and upcall stubs though.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16311#discussion_r1373550409

Reply via email to