]> granicus.if.org Git - llvm/commit
CrashHandler: be careful about crashing while handling
authorJF Bastien <jfbastien@apple.com>
Thu, 25 Jul 2019 16:07:41 +0000 (16:07 +0000)
committerJF Bastien <jfbastien@apple.com>
Thu, 25 Jul 2019 16:07:41 +0000 (16:07 +0000)
commit0795f27eac39fed8a3ca6082b70b63e926f4135f
tree3753350e3afc8dac8668125eb7191a71cfccfe00
parent5d4eb40f9bd80c5ec91cf337beefeb6f438c09c4
CrashHandler: be careful about crashing while handling

Summary:
Looking at the current Apple-specific code for crash handling it does a few
silly things that I think we should avoid while handling crashes:

  * Try real hard not to allocate.
  * Set the global crash reporter string early so that any crash while
    generating the stack trace will still report some info.
  * Prevent reordering of operations in the current thread.

<rdar://problem/53503334>

Subscribers: hiraditya, jkorous, dexonsmith, llvm-commits, beanz, Bigcheese, thakis, lattner, jordan_rose

Tags: #llvm

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

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