[Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 19 Jun 2013 22:53:45 +0000 (22:53 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 19 Jun 2013 22:53:45 +0000 (22:53 +0000)
commit4e91fa3834008778b10d6770f9872c50e1e75659
tree8a7c6b36f935f1db21a2d5016be46a2efd646a8f
parent228546b8cb53686f1cc8859ec39bbb11f5c15e90
[Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the thread-local "CurrentContext"
in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread.

When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable
for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread.

The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up
crash-recovery for its parent.

A test for this will be added in the clang repository.
rdar://14204560

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184380 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/CrashRecoveryContext.cpp