From 4862ff8d17dd8e2bd47394f6c368c2e2c9609c39 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 11 Dec 2018 09:53:11 +0000 Subject: [PATCH] [SEH] Zero-initialize EXCEPTION_RECORD and UNWIND_HISTORY_TABLE before calling RtlUnwindEx This fixes PR39935. llvm-svn: 348836 --- libunwind/src/Unwind-seh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libunwind/src/Unwind-seh.cpp b/libunwind/src/Unwind-seh.cpp index 73616a8..73a950a 100644 --- a/libunwind/src/Unwind-seh.cpp +++ b/libunwind/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; -- 2.7.4