diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-17 22:32:39 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-17 22:32:39 +0000 |
commit | 09b0c7891845122a8c0472995b03b5fefcc284d2 (patch) | |
tree | a4706d94f29e0246b47d506d2dce5a420b6a2e46 /llvm/lib/Support/CrashRecoveryContext.cpp | |
parent | b30266ed205edf64b990c5cda85b8336939e40d9 (diff) | |
download | bcm5719-llvm-09b0c7891845122a8c0472995b03b5fefcc284d2.tar.gz bcm5719-llvm-09b0c7891845122a8c0472995b03b5fefcc284d2.zip |
CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
llvm-svn: 111309
Diffstat (limited to 'llvm/lib/Support/CrashRecoveryContext.cpp')
-rw-r--r-- | llvm/lib/Support/CrashRecoveryContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp index 296cc3e8f3b..49258ede83c 100644 --- a/llvm/lib/Support/CrashRecoveryContext.cpp +++ b/llvm/lib/Support/CrashRecoveryContext.cpp @@ -38,6 +38,10 @@ public: } void HandleCrash() { + // Eliminate the current context entry, to avoid re-entering in case the + // cleanup code crashes. + CurrentContext.erase(); + assert(!Failed && "Crash recovery context already failed!"); Failed = true; |