summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2016-03-25 10:12:37 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-03-25 10:15:03 +0900
commit95cad43adb26410a31adaa8f30908f07876bb742 (patch)
treeca5ae767b36b7df42df599196b9508e9925342ac /src/pal
parentedb66eb76eaa046913c0de0d5c7f917f2cfc8465 (diff)
downloadcoreclr-95cad43adb26410a31adaa8f30908f07876bb742.tar.gz
coreclr-95cad43adb26410a31adaa8f30908f07876bb742.tar.bz2
coreclr-95cad43adb26410a31adaa8f30908f07876bb742.zip
Fix ARM/Unwind: explicitly mark the end of stack
Libunwind-arm unw_step returns 0 with unchanged PC if it hits the bottom of the stack. Thus, seh-unwind.cpp::PAL_VirtualUnwind should explicitly mark that it has reached the bottom as it does with ARM64, FreeBSD, or APPLE for ARM/Linux. Fix #3859 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'src/pal')
-rw-r--r--src/pal/src/exception/seh-unwind.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp
index ee33f7a83a..f708ce57e8 100644
--- a/src/pal/src/exception/seh-unwind.cpp
+++ b/src/pal/src/exception/seh-unwind.cpp
@@ -226,7 +226,7 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
unw_context_t unwContext;
unw_cursor_t cursor;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_) || defined(_ARM_)
DWORD64 curPc;
#endif
@@ -262,7 +262,7 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
WinContextToUnwindCursor(context, &cursor);
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_) || defined(_ARM_)
// OSX and FreeBSD appear to do two different things when unwinding
// 1: If it reaches where it cannot unwind anymore, say a
// managed frame. It wil return 0, but also update the $pc
@@ -295,7 +295,7 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
// Update the passed in windows context to reflect the unwind
//
UnwindContextToWinContext(&cursor, context);
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_) || defined(_ARM_)
if (st == 0 && CONTEXTGetPC(context) == curPc)
{
CONTEXTSetPC(context, 0);