[SEH] Zero-initialize EXCEPTION_RECORD and UNWIND_HISTORY_TABLE before calling RtlUnw...
authorMartin Storsjo <martin@martin.st>
Tue, 11 Dec 2018 09:53:11 +0000 (09:53 +0000)
committerMartin Storsjo <martin@martin.st>
Tue, 11 Dec 2018 09:53:11 +0000 (09:53 +0000)
This fixes PR39935.

llvm-svn: 348836

libunwind/src/Unwind-seh.cpp

index 73616a8..73a950a 100644 (file)
@@ -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;