diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2016-01-25 21:31:48 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-01-25 21:31:48 +0100 |
commit | 05870d057e8f07ce1bcff793f3d450d00f49ba4e (patch) | |
tree | 1c7f830d75964a15077816b9df2c9ca86480217f | |
parent | 525c7be46158b83bcbf171d89a0b7cf2c85fb829 (diff) | |
parent | 99e6316bcdb60ed7a2eff7d7ee7ae9ebb66e32fb (diff) | |
download | coreclr-05870d057e8f07ce1bcff793f3d450d00f49ba4e.tar.gz coreclr-05870d057e8f07ce1bcff793f3d450d00f49ba4e.tar.bz2 coreclr-05870d057e8f07ce1bcff793f3d450d00f49ba4e.zip |
Merge pull request #2807 from kangaroo/seh-unwind-context-fix
Fix PAL_VirtualUnwindOutOfProc for the case where unw_context is not …
-rw-r--r-- | src/pal/src/exception/seh-unwind.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp index dde7ba87fc..c53e93be43 100644 --- a/src/pal/src/exception/seh-unwind.cpp +++ b/src/pal/src/exception/seh-unwind.cpp @@ -169,7 +169,7 @@ static void GetContextPointer(unw_cursor_t *cursor, unw_context_t *unwContext, i { SIZE_T *pLoc = (SIZE_T *)saveLoc.u.addr; // Filter out fake save locations that point to unwContext - if ((pLoc < (SIZE_T *)unwContext) || ((SIZE_T *)(unwContext + 1) <= pLoc)) + if (unwContext == NULL || (pLoc < (SIZE_T *)unwContext) || ((SIZE_T *)(unwContext + 1) <= pLoc)) *contextPointer = (SIZE_T *)saveLoc.u.addr; } #endif @@ -483,7 +483,6 @@ BOOL PAL_VirtualUnwindOutOfProc(CONTEXT *context, LockHolder lockHolder(&lock.cs); int st; - unw_context_t unwContext; unw_cursor_t cursor; unw_addr_space_t addrSpace = 0; void *libunwindUptPtr = NULL; @@ -491,7 +490,7 @@ BOOL PAL_VirtualUnwindOutOfProc(CONTEXT *context, LibunwindCallbacksInfo.Context = context; LibunwindCallbacksInfo.readMemCallback = readMemCallback; - WinContextToUnwindContext(context, &unwContext); + addrSpace = unw_create_addr_space(&unwind_accessors, 0); #ifdef HAVE_LIBUNWIND_PTRACE libunwindUptPtr = _UPT_create(pid); @@ -514,7 +513,7 @@ BOOL PAL_VirtualUnwindOutOfProc(CONTEXT *context, if (contextPointers != NULL) { - GetContextPointers(&cursor, &unwContext, contextPointers); + GetContextPointers(&cursor, NULL, contextPointers); } result = TRUE; |