java-smt icon indicating copy to clipboard operation
java-smt copied to clipboard

Evaluate catching SIGSEGV from JNI

Open cheshire opened this issue 8 years ago • 1 comments

This is not a critical feature, but apparently it's possible. See:

http://blog.httrack.com/blog/2013/08/23/catching-posix-signals-on-android/ https://github.com/xroche/coffeecatch

cheshire avatar Aug 19 '16 14:08 cheshire

It is indeed possible to catch (most) SigSegv, on Unix even with error-trace. There are 2 main Problems though:

  1. You have to wrap every single method with the construct (Possible in our Boolector JNI wrapper for example. But not in our current Z3 binaries)

  2. Because the coffeecatch wrapper (as does any other wrapper of this kind by nature) uses not async-signal-safe methods there could (and will) be unforseen behavior in the code. Especially if threads (Z3?) are used! (Deadlocks etc.)

I don't think its a good idea to use this wrapper per default to catch SigSegvs, however it may be a useful tool to find problems (like the MathSat5 Sigsegv).

baierd avatar Mar 17 '20 12:03 baierd