RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]
Jorn Vernee
jvernee at openjdk.org
Thu Oct 26 18:11:06 UTC 2023
On Thu, 26 Oct 2023 18:07:24 GMT, Jorn Vernee <jvernee at 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
More information about the hotspot-compiler-dev
mailing list