summaryrefslogtreecommitdiff
path: root/src/vm/exceptionhandling.h
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-10-06 23:46:49 +0200
committerJan Vorlicek <janvorli@microsoft.com>2015-10-06 23:46:49 +0200
commit72cc25a8ef0c014cb9a899d51126cd00ed5823af (patch)
tree739ca656b0e249215461201323eb18c23d96b8b0 /src/vm/exceptionhandling.h
parent7889c40b6fb68ecd57a53894544f7a3ae111de0f (diff)
downloadcoreclr-72cc25a8ef0c014cb9a899d51126cd00ed5823af.tar.gz
coreclr-72cc25a8ef0c014cb9a899d51126cd00ed5823af.tar.bz2
coreclr-72cc25a8ef0c014cb9a899d51126cd00ed5823af.zip
Fix issue in the new exception handling
There was a problem with scanned stack range stored in an exception tracker. After unwinding a sequence of native frames during the 2nd pass of unwinding, the scanned stack range was not cleared and referenced stack frames that were unwound. In some rare cases related to throwing an exception from a catch handler, this was causing the exception handling to consider stack frames that accidentally had the same range of addresses as already visited, which resulted in a wrong exception handler being executed.
Diffstat (limited to 'src/vm/exceptionhandling.h')
-rw-r--r--src/vm/exceptionhandling.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vm/exceptionhandling.h b/src/vm/exceptionhandling.h
index ceb806ef79..66462fcede 100644
--- a/src/vm/exceptionhandling.h
+++ b/src/vm/exceptionhandling.h
@@ -302,12 +302,17 @@ public:
return m_pInitialExplicitFrame;
}
- // Reset the range of explicit frames that covers already unwound frames.
- void ResetUnwoundExplicitFramesRange()
+#ifdef FEATURE_PAL
+ // Reset the range of explicit frames, the limit frame and the scanned
+ // stack range before unwinding a sequence of native frames. These frames
+ // will be in the unwound part of the stack.
+ void CleanupBeforeNativeFramesUnwind()
{
m_pInitialExplicitFrame = NULL;
m_pLimitFrame = NULL;
+ m_ScannedStackRange.Reset();
}
+#endif // FEATURE_PAL
// Determines if we have unwound to the specified parent method frame.
// Currently this is only used for funclet skipping.