Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8340633

Add linker option that specifies the behavior in case of an exception in upcall

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs

      A DESCRIPTION OF THE PROBLEM :
      Tests of the OpenJ9 implementation imply that when a downcall is called that points to an upcall, exceptions thrown in the upcall are propagated up the stack unchanged. The Hotspot implementation and documentation state that any exception in an upcall is a fatal error, causing the JVM to crash via System.exit(1).

      Link to OpenJ9 tests that I mean:
      https://github.com/eclipse-openj9/openj9/blob/master/test/functional/Java22andUp/src/org/openj9/test/jep454/upcall/InvalidUpCallTests.java

      To resolve this conflict, I propose to introduce a linker option that will enable the behavior as in the OpenJ9 implementation. Something like Linker.Option.jvmCaller(), which means that in case of an exception, upcall returns undefined value and env->ExceptionCheck() is true, and the caller knows how to handle this case.

            jvernee Jorn Vernee
            pnarayanaswa Praveen Narayanaswamy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: