Summary: | JNI: Check & Handle Exception after calling back into Java | ||
---|---|---|---|
Product: | [JogAmp] General | Reporter: | Sven Gothel <sgothel> |
Component: | generic | Assignee: | Sven Gothel <sgothel> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | tbd | ||
Hardware: | All | ||
OS: | all | ||
Type: | POLICY | SCM Refs: |
jogl ddc29141207d9c69f8558265a464cdc4bc014d65
gluegen 5736716ed0598c97273583717ffb9d22a60ca7a4
jogl a8c2de110a2254af137a3d99007cc77e3ecd8078
jogl abde7e96c8ea8f36b48e99ed62029bf0e178a8fa
|
Workaround: | --- |
Description
Sven Gothel
2019-12-06 08:33:28 CET
ddc29141207d9c69f8558265a464cdc4bc014d65 JNI: NEWT Check & Handle Exception after calling back into Java (X11Display + X11Window) 5736716ed0598c97273583717ffb9d22a60ca7a4 JNI: GlueGen JavaEmitter: Check & Handle Exception after calling back into Java The generated JNI code JVMUtil_NewDirectByteBufferCopy(..) calls Buffers.newDirectByteBuffer(..) and potential exceptions should be checked. a8c2de110a2254af137a3d99007cc77e3ecd8078 NEWT Check & Handle Exception after calling back into Java (NewtCommon.c) https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/jni_exceptions.html "A JNI function with a return code always sets an error if an exception is pending. You do not need to check for exceptions if a JNI function returns success, but you must check for an exception in an error case. If you do not check, the next time you go through the JNI, the JNI code detects a pending exception and throws it. An exception can be difficult to debug if it is thrown later and, possibly, at a different point in the code from the point at which it was created." https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html#Call_type_Method_routines THROWS: Exceptions raised during the execution of the Java method. +++ https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/design.html#java_exceptions (In reply to Sven Gothel from comment #3) > a8c2de110a2254af137a3d99007cc77e3ecd8078 > NEWT Check & Handle Exception after calling back into Java (NewtCommon.c) fixed with commit abde7e96c8ea8f36b48e99ed62029bf0e178a8fa |