7 Commits

Author SHA1 Message Date
Vitaly Buka
fee7735cee Revert "Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests""
This dependents on r303729 which was reverted.

This reverts commit r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303796 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 19:11:12 +00:00
Vitaly Buka
f0fdd6463d Prevent UBSan report in CrashRecovery tests
Reverted by mistake with r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303785 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 18:11:57 +00:00
Vitaly Buka
bd571bcd53 Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests"
It's not needed after r303729.

This reverts commit r303311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303783 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:58:09 +00:00
Reid Kleckner
9292b008db Attempt to pacify ASan and UBSan reports in CrashRecovery tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303311 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 22:23:20 +00:00
Reid Kleckner
aabc86087d Re-land r303274: "[CrashRecovery] Use SEH __try instead of VEH when available"
We have to check gCrashRecoveryEnabled before using __try.

In other words, SEH works too well and we ended up recovering from
crashes in implicit module builds that we weren't supposed to. Only
libclang is supposed to enable CrashRecoveryContext to allow implicit
module builds to crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303279 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 18:16:17 +00:00
Reid Kleckner
0f42e5be40 Revert "[CrashRecovery] Use SEH __try instead of VEH when available"
This reverts commit r303274, it appears to break some clang tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303275 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 17:15:00 +00:00
Reid Kleckner
8d2c1f540e [CrashRecovery] Use SEH __try instead of VEH when available
Summary:
It avoids problems when other libraries raise exceptions. In particular,
OutputDebugString raises an exception that the debugger is supposed to
catch and suppress. VEH kicks in first right now, and that is entirely
incorrect.

Unfortunately, GCC does not support SEH, so I've kept the old buggy VEH
codepath around. We could fix it with SetUnhandledExceptionFilter, but
that is not per-thread, so a well-behaved library shouldn't set it.

Reviewers: zturner

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D33261

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303274 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-17 17:02:16 +00:00