[foreign-memaccess+abi] RFR: 8267989: Exceptions thrown during upcalls should be handled [v3]

Jorn Vernee jvernee at openjdk.java.net
Tue Jun 1 12:00:10 UTC 2021


> Hi,
> 
> 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.
> 
> Thanks,
> Jorn

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  - remove exit code constant
  - add security manager into test
  - use privilegedGetProperty instead of System.getProperty in CABI

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/543/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/543/files/668e15df..a7e73a9b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=543&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=543&range=01-02

  Stats: 76 lines in 7 files changed: 50 ins; 14 del; 12 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/543.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/543/head:pull/543

PR: https://git.openjdk.java.net/panama-foreign/pull/543


More information about the panama-dev mailing list