[Tizen] Fix OOPStackUnwinderX86::Unwind crash when Eip is invalid
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Wed, 25 Apr 2018 18:31:59 +0000 (21:31 +0300)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 27 Sep 2022 12:50:22 +0000 (15:50 +0300)
src/coreclr/unwinder/i386/unwinder_i386.cpp

index 958d0af..75bbabb 100644 (file)
@@ -29,7 +29,7 @@ BOOL OOPStackUnwinderX86::Unwind(T_CONTEXT* pContextRecord, T_KNONVOLATILE_CONTE
     EECodeInfo codeInfo;
     codeInfo.Init((PCODE) ControlPc);
 
-    if (!UnwindStackFrame(&rd, &codeInfo, UpdateAllRegs, &codeManState, NULL))
+    if (!codeInfo.IsValid() || !UnwindStackFrame(&rd, &codeInfo, UpdateAllRegs, &codeManState, NULL))
     {
         return FALSE;
     }