summaryrefslogtreecommitdiff
path: root/packaging/0014-Fix-OOPStackUnwinderX86-Unwind-crash-when-Eip-is-inv.patch
blob: 8cec23c4abc6965fbfefbd1b57f401004bb35879 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From e832e5ca7bc9b7c2bf3ccbc4333dcb0044d3543c Mon Sep 17 00:00:00 2001
From: Igor Kulaychuk <i.kulaychuk@samsung.com>
Date: Wed, 25 Apr 2018 21:31:59 +0300
Subject: [PATCH 14/14] Fix OOPStackUnwinderX86::Unwind crash when Eip is
 invalid

---
 src/unwinder/i386/unwinder_i386.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/unwinder/i386/unwinder_i386.cpp b/src/unwinder/i386/unwinder_i386.cpp
index 42c19cb..8cd8f48 100644
--- a/src/unwinder/i386/unwinder_i386.cpp
+++ b/src/unwinder/i386/unwinder_i386.cpp
@@ -30,7 +30,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;
     }
-- 
2.7.4