summaryrefslogtreecommitdiff
path: root/lib/Support/CrashRecoveryContext.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-17 22:32:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-17 22:32:39 +0000
commitebe7eb884e30c8e9e9f44f499d75ee39cc6c6d6e (patch)
tree2290fbc151748c321cd039b95488ccdaa2681e0c /lib/Support/CrashRecoveryContext.cpp
parenta8fa798246503c726b02b415bb1f1b26bc0b0159 (diff)
downloadllvm-ebe7eb884e30c8e9e9f44f499d75ee39cc6c6d6e.tar.gz
llvm-ebe7eb884e30c8e9e9f44f499d75ee39cc6c6d6e.tar.bz2
llvm-ebe7eb884e30c8e9e9f44f499d75ee39cc6c6d6e.tar.xz
CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/CrashRecoveryContext.cpp')
-rw-r--r--lib/Support/CrashRecoveryContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Support/CrashRecoveryContext.cpp b/lib/Support/CrashRecoveryContext.cpp
index 296cc3e8f3..49258ede83 100644
--- a/lib/Support/CrashRecoveryContext.cpp
+++ b/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;