[foreign-memaccess+abi] RFR: 8303835: Remove uncaught exception handler linker option

David Holmes dholmes at openjdk.org
Thu Mar 9 03:13:31 UTC 2023


On Wed, 8 Mar 2023 20:41:06 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Remove the uncaught exception handler linker option for now. It does not seem polished enough, and using the thread's uncaught exception handler seems problematic as well.

Thumbs up on not using the thread's uncaughtExceptionHandler :)

src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java line 315:

> 313:         if (t != null) {
> 314:             t.printStackTrace();
> 315:             System.err.println("Unrecoverable uncaught exception encountered. The VM will now exit");

Suggestion:

try {
  t.printSackTrace();
  System.err...
} finally {
  JLA.exit(1);
}

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

PR: https://git.openjdk.org/panama-foreign/pull/813


More information about the panama-dev mailing list