diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-05-30 10:30:14 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-05-30 10:30:14 -0700 |
commit | f440bb075cebc8624f0367cea79ff83c9573ba44 (patch) | |
tree | 337a12f82d58871de0203046f4f39d90f54b6de0 /src/pal | |
parent | 352df35c124104586ee4c977556cb50ce720af62 (diff) | |
parent | 664286a86e1c35d3ceded6f3b09a3e5a57cf5ad5 (diff) | |
download | coreclr-f440bb075cebc8624f0367cea79ff83c9573ba44.tar.gz coreclr-f440bb075cebc8624f0367cea79ff83c9573ba44.tar.bz2 coreclr-f440bb075cebc8624f0367cea79ff83c9573ba44.zip |
Merge pull request #5087 from myungjoo/fix/4859/janvorli_suggestion
Fix/4859 Unit Test 143837 Fail
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/src/exception/seh-unwind.cpp | 1 | ||||
-rw-r--r-- | src/pal/src/thread/context.cpp | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp index f6dd1d9b67..763306b15d 100644 --- a/src/pal/src/exception/seh-unwind.cpp +++ b/src/pal/src/exception/seh-unwind.cpp @@ -141,7 +141,6 @@ static void UnwindContextToWinContext(unw_cursor_t *cursor, CONTEXT *winContext) #elif defined(_ARM_) unw_get_reg(cursor, UNW_REG_SP, (unw_word_t *) &winContext->Sp); unw_get_reg(cursor, UNW_REG_IP, (unw_word_t *) &winContext->Pc); - winContext->Pc &= ~0x1; unw_get_reg(cursor, UNW_ARM_R14, (unw_word_t *) &winContext->Lr); unw_get_reg(cursor, UNW_ARM_R4, (unw_word_t *) &winContext->R4); unw_get_reg(cursor, UNW_ARM_R5, (unw_word_t *) &winContext->R5); diff --git a/src/pal/src/thread/context.cpp b/src/pal/src/thread/context.cpp index 384c7c8e62..d644e0d1eb 100644 --- a/src/pal/src/thread/context.cpp +++ b/src/pal/src/thread/context.cpp @@ -488,6 +488,12 @@ void CONTEXTFromNativeContext(const native_context_t *native, LPCONTEXT lpContex if ((contextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL) { ASSIGN_CONTROL_REGS +#ifdef _ARM_ + // WinContext assumes that the least bit of Pc is always 1 (denoting thumb) + // although the pc value retrived from native context might not have set the least bit. + // This becomes especially problematic if the context is on the JIT_WRITEBARRIER. + lpContext->Pc |= 0x1; +#endif } if ((contextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER) |