active exception regression fix (dotnet/coreclr#6117)
authorchunseoklee <chunseoklee@naver.com>
Tue, 12 Jul 2016 21:28:26 +0000 (06:28 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 12 Jul 2016 21:28:26 +0000 (23:28 +0200)
This patch fixes regression caused by 597e160 commit.
Previous PAL_VirtualUnwind does not set CONTEXT_UNWOUND_TO_CALL
properly. In this patch, the flag is added for non-signaled exception.

Commit migrated from https://github.com/dotnet/coreclr/commit/adb2188ed70751f70a1b9e06aa497bc027cdf8a8

src/coreclr/src/pal/src/exception/seh-unwind.cpp

index 763306b..c8710de 100644 (file)
@@ -289,10 +289,16 @@ BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextP
     if (unw_is_signal_frame(&cursor) > 0)
     {
         context->ContextFlags |= CONTEXT_EXCEPTION_ACTIVE;
+#if defined(_ARM_) || defined(_ARM64_)
+        context->ContextFlags &= ~CONTEXT_UNWOUND_TO_CALL;
+#endif // _ARM_ || _ARM64_
     }
     else
     {
         context->ContextFlags &= ~CONTEXT_EXCEPTION_ACTIVE;
+#if defined(_ARM_) || defined(_ARM64_)
+        context->ContextFlags |= CONTEXT_UNWOUND_TO_CALL;
+#endif // _ARM_ || _ARM64_
     }
 
     // Update the passed in windows context to reflect the unwind