[PATCH] D74078: [Clang] When using SEH, create a impl instance for CrashRecoveryContext. NFCI.

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 11:02:56 PST 2020


aganea created this revision.
aganea added reviewers: hans, rnk.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aganea retitled this revision from "[Clang] When using SEH, create a context for CrashRecoveryContext" to "[Clang] When using SEH, create a impl instance for CrashRecoveryContext".
aganea retitled this revision from "[Clang] When using SEH, create a impl instance for CrashRecoveryContext" to "[Clang] When using SEH, create a impl instance for CrashRecoveryContext. NFCI.".

Previously, the SEH codepath in CrashRecoveryContext didn't create a `CrashRecoveryContextImpl`. The other codepaths (VEH and Unix) were creating it.

When running with `-fintegrated-cc1`, this is needed to handle `exit()` as a jump to `CrashRecoveryContext`'s exception filter, through a call to `RaiseException`. In that situation, we need a user-defined exception code, which is later interpreted as an `exit()` by the exception filter. Which in turn needs to set `RetCode` accordingly, inside the exception filter, and **before **calling `HandleCrash()`.

//This is a support patch for D73742 <https://reviews.llvm.org/D73742>.//


https://reviews.llvm.org/D74078

Files:
  llvm/lib/Support/CrashRecoveryContext.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74078.242692.patch
Type: text/x-patch
Size: 3677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/5a2a1db9/attachment.bin>


More information about the llvm-commits mailing list