[foreign-memaccess+abi] RFR: 8267989: Exceptions thrown during upcalls should be handled
jvernee at openjdk.java.net
Mon May 31 17:48:01 UTC 2021
This patch regularizes exception handling for exceptions thrown during upcalls. Exceptions thrown during upcalls are now always handled by printing out the stack trace and then calling `System::exit` (see the JBS issue for some motivation).
I've added some documentation for the exception handling to `CLinker::upcallStub`, as well as a new public `int` constant in `CLinker` which is the error code that is passed to `System::exit`. The returned error code can also be configured by a system property, which for now is mostly useful for testing purposes to make sure we don't get a consistent false positive.
- Use priviledgedGetProperty instead of Integer.getInteger
- Fix test and add documentation + ERR_UNCAUGHT_EXCEPTION
- Add tests
- Handle exception uniformly across upcall modes
Stats: 191 lines in 6 files changed: 188 ins; 0 del; 3 mod
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/543/head:pull/543
More information about the panama-dev