[Support] Don't modify the current EH context during stack unwinding
authorReid Kleckner <rnk@google.com>
Fri, 31 Jan 2020 22:39:14 +0000 (14:39 -0800)
committerReid Kleckner <rnk@google.com>
Sat, 1 Feb 2020 01:04:01 +0000 (17:04 -0800)
commitb074acb82f7e75a189fa7933b09627241b166121
treeac2f618ae7c5fb22ab9d402ab62430d6a8c1ddef
parenta1daa7d079aa86589ac7e73e818d4ab95969275f
[Support] Don't modify the current EH context during stack unwinding

Copy it instead. Otherwise, key registers (such as RBP) may get zeroed
out by the stack unwinder.

Fixes CrashRecoveryTest.DumpStackCleanup with MSVC in release builds.

Reviewed By: stella.stamenova

Differential Revision: https://reviews.llvm.org/D73809
llvm/lib/Support/Windows/Signals.inc