From 03a10740898eeb2b0c7a7c6bea3e293a221309a1 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 11 Dec 2018 09:53:11 +0000 Subject: [SEH] Zero-initialize EXCEPTION_RECORD and UNWIND_HISTORY_TABLE before calling RtlUnwindEx This fixes PR39935. git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@348836 91177308-0d34-0410-b5e6-96231b3b80d8 --- src/Unwind-seh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Unwind-seh.cpp b/src/Unwind-seh.cpp index 73616a8..73a950a 100644 --- a/src/Unwind-seh.cpp +++ b/src/Unwind-seh.cpp @@ -374,6 +374,8 @@ _Unwind_Resume(_Unwind_Exception *exception_object) { CONTEXT ms_ctx; UNWIND_HISTORY_TABLE hist; + memset(&ms_exc, 0, sizeof(ms_exc)); + memset(&hist, 0, sizeof(hist)); ms_exc.ExceptionCode = STATUS_GCC_THROW; ms_exc.ExceptionFlags = EXCEPTION_NONCONTINUABLE; ms_exc.NumberParameters = 4; -- cgit v1.2.3