-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
generic
-
generic
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.
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.