diff options
author | Geoff Norton <kangaroo@clr.ninja> | 2016-01-22 10:44:37 -0800 |
---|---|---|
committer | Geoff Norton <kangaroo@clr.ninja> | 2016-01-22 20:02:19 -0800 |
commit | 99e6316bcdb60ed7a2eff7d7ee7ae9ebb66e32fb (patch) | |
tree | a411adf4195dcb58bd8a3e54ff572eea7f40c8a1 /src/pal/src/exception/seh-unwind.cpp | |
parent | 431f7ff1150561a9d27e29c155706e279328446a (diff) | |
download | coreclr-99e6316bcdb60ed7a2eff7d7ee7ae9ebb66e32fb.tar.gz coreclr-99e6316bcdb60ed7a2eff7d7ee7ae9ebb66e32fb.tar.bz2 coreclr-99e6316bcdb60ed7a2eff7d7ee7ae9ebb66e32fb.zip |
Fix PAL_VirtualUnwindOutOfProc for the case where unw_context is not a ucontext_t
Diffstat (limited to 'src/pal/src/exception/seh-unwind.cpp')
-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; |