[PATCH] D23662: [libclang] Control whether crash recovery is enabled/disabled using function argument.
John Brawn via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 18 08:06:40 PDT 2016
john.brawn added a subscriber: john.brawn.
john.brawn added a comment.
> When my Java application calls clang_createIndex() with crash recovery enabled it replaces the JVM's segfault handler with CrashRecoverySignalHandler and now this handler gets all the segfault signals that would have normally been sent to the JVM and when it does and tries to restore the previous segfault hanlder (which is the JVMs) it doesn't install the right one because the JVM ends up crashing and producing a core dump.
Surely the fix then is to make sure CrashRecoveryContext::Disable //does// reinstall the right signal handler?
> The only way to correctly solve my problem is to set the environment variable 'LIBCLANG_DISABLE_CRASH_RECOVERY' but I find this to not be a very nice way to control the program behaviour
Why not? Also I notice that using environment variables to control behaviour is used in a bunch of places in libclang so you're introducing some inconsistency here.
Repository:
rL LLVM
https://reviews.llvm.org/D23662
More information about the cfe-commits
mailing list