Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-26 Thread Jorn Vernee
On Thu, 26 Oct 2023 18:07:24 GMT, Jorn Vernee 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 p

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-26 Thread Jorn Vernee
> 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 t

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-26 Thread David Holmes
On Thu, 26 Oct 2023 18:07:24 GMT, Jorn Vernee wrote: >> 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:

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-27 Thread Maurizio Cimadamore
On Fri, 27 Oct 2023 04:54:04 GMT, David Holmes wrote: >> 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

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-27 Thread Maurizio Cimadamore
On Fri, 27 Oct 2023 04:54:04 GMT, David Holmes wrote: >> 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

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-27 Thread Jorn Vernee
On Fri, 27 Oct 2023 08:52:42 GMT, Maurizio Cimadamore wrote: >> OOME is pretty much understood to be possible anywhere, given it is a >> VirtualMachineError. We often do not document it explicitly. The risk with >> documenting it is that it gives the impression that other methods, which >> do

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-27 Thread Jorn Vernee
On Thu, 26 Oct 2023 18:11:01 GMT, Jorn Vernee 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 p