summaryrefslogtreecommitdiff
path: root/src/pal/src/exception/seh-unwind.cpp
diff options
context:
space:
mode:
authorKamil Rytarowski <krytarowski@users.noreply.github.com>2016-04-29 23:35:19 +0200
committerJan Kotas <jkotas@microsoft.com>2016-04-29 14:35:19 -0700
commit0f81ad3359b817ba0735db78cef1bd2fcab555a9 (patch)
tree34169ba341e2181e7ae87015c167b83553f89684 /src/pal/src/exception/seh-unwind.cpp
parent66c8e59fcc4cbf384f2170aea07e9c968a7f97d7 (diff)
downloadcoreclr-0f81ad3359b817ba0735db78cef1bd2fcab555a9.tar.gz
coreclr-0f81ad3359b817ba0735db78cef1bd2fcab555a9.tar.bz2
coreclr-0f81ad3359b817ba0735db78cef1bd2fcab555a9.zip
Treat NetBSD like FreeBSD and OSX in PAL_VirtualUnwind() (#4551)
This fixes hangs in the runtime observed while running CoreFX managed tests. Thanks @janvorli and @myungjoo Fix #4380
Diffstat (limited to 'src/pal/src/exception/seh-unwind.cpp')
-rw-r--r--src/pal/src/exception/seh-unwind.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp
index dbe80b12cc..f6dd1d9b67 100644
--- a/src/pal/src/exception/seh-unwind.cpp
+++ b/src/pal/src/exception/seh-unwind.cpp
@@ -229,7 +229,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_) || defined(_ARM_)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(_ARM64_) || defined(_ARM_)
DWORD64 curPc;
#endif
@@ -266,8 +266,8 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
WinContextToUnwindCursor(context, &cursor);
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_ARM64_) || defined(_ARM_)
- // OSX and FreeBSD appear to do two different things when unwinding
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(_ARM64_) || defined(_ARM_)
+ // FreeBSD, NetBSD and OSX 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
// 2: If it unwinds all the way to _start it will return
@@ -299,7 +299,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_) || defined(_ARM_)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(_ARM64_) || defined(_ARM_)
if (st == 0 && CONTEXTGetPC(context) == curPc)
{
CONTEXTSetPC(context, 0);