Fix #4859
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
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)