[foreign-memaccess+abi] RFR: 8267989: Exceptions thrown during upcalls should be handled
jvernee at openjdk.java.net
Mon May 31 18:36:40 UTC 2021
On Mon, 31 May 2021 17:56:37 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 123:
>>> 121: * @see CLinker#upcallStub(MethodHandle, FunctionDescriptor, ResourceScope)
>>> 122: */
>>> 123: int ERR_UNCAUGHT_EXCEPTION = privilegedGetProperty("jdk.incubator.foreign.uncaught_exception_code", 1);
>> Do we need a system property? E.g. can it be a constant value?
> We could just use `1` here as well, but during testing I've found that the default uncaught exception handler also return `1`, so I was getting a false positive.
Thinking some more. Having a system property is probably overkill, and checking stderr for the exception message in the test is good enough
More information about the panama-dev