Menu

#28 SEH in jSuneido/JSDI

jSuneido-x64
open
nobody
x64 (2) JSDI (6)
5
2013-11-10
2013-11-10
No

Problem

There are two issues.

  1. As documented in jsdi_callback.cpp, if a dll invocation calls multiple Suneido callbacks before returning control to Suneido, it won't short-circuit if the first callback throws a Suneido (i.e. Java/JNI) exception.
  2. JSDI can only catch JNI exceptions. Therefore it can't catch other exception types supported by SEH, such as exceptions that cross the kernel/user code boundary, and exceptions raised at the machine level (e.g. access violation).

TODO

  • Convert JSDI to build using Microsoft compiler (because MinGW doesn't support SEH and probably won't do so for a long time, if ever).
  • Raise and catch SEH exceptions at appropriate places.
    • Every callback invocation should check for a JNI exception and raise an SEH exception...
    • Every dll invocation should catch SEH exceptions and raise JNI exceptions.
    • The above bullets are given as examples and don't necessarily represent an exhaustive list of what needs to be done.

Discussion


Log in to post a comment.