summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vm/exceptionhandling.h9
-rw-r--r--src/vm/stackwalk.cpp13
2 files changed, 16 insertions, 6 deletions
diff --git a/src/vm/exceptionhandling.h b/src/vm/exceptionhandling.h
index d5dd4807ce..2a8181b08b 100644
--- a/src/vm/exceptionhandling.h
+++ b/src/vm/exceptionhandling.h
@@ -558,7 +558,14 @@ public:
return m_sfCallerOfActualHandlerFrame;
}
- StackFrame GetCallerOfCollapsedActualHandlingFrame()
+ StackFrame GetCallerOfEnclosingClause()
+ {
+ LIMITED_METHOD_CONTRACT;
+
+ return m_EnclosingClauseInfoForGCReporting.GetEnclosingClauseCallerSP();
+ }
+
+ StackFrame GetCallerOfCollapsedEnclosingClause()
{
LIMITED_METHOD_CONTRACT;
diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp
index 7237c4c37d..2250fd517a 100644
--- a/src/vm/stackwalk.cpp
+++ b/src/vm/stackwalk.cpp
@@ -1683,8 +1683,6 @@ StackWalkAction StackFrameIterator::Filter(void)
ProcessFuncletsForGCReporting:
do
{
- fRecheckCurrentFrame = false;
-
// When enumerating GC references for "liveness" reporting, depending upon the architecture,
// the responsibility of who reports what varies:
//
@@ -1745,7 +1743,7 @@ ProcessFuncletsForGCReporting:
// only source of evidence about it.
// This is different from Windows where the full stack is preserved until an exception is fully handled
// and so we can detect it just from walking the stack.
- if (!fSkippingFunclet && (pTracker != NULL))
+ if (!fRecheckCurrentFrame && !fSkippingFunclet && (pTracker != NULL))
{
// The stack walker is not skipping frames now, which means it didn't find a funclet frame that
// would require skipping the current frame. If we find a tracker with caller of actual handling
@@ -1758,14 +1756,14 @@ ProcessFuncletsForGCReporting:
{
if (hasFuncletStarted)
{
- sfFuncletParent = pCurrTracker->GetCallerOfActualHandlingFrame();
+ sfFuncletParent = pCurrTracker->GetCallerOfEnclosingClause();
if (!sfFuncletParent.IsNull() && ExceptionTracker::IsUnwoundToTargetParentFrame(&m_crawl, sfFuncletParent))
{
break;
}
}
- sfFuncletParent = pCurrTracker->GetCallerOfCollapsedActualHandlingFrame();
+ sfFuncletParent = pCurrTracker->GetCallerOfCollapsedEnclosingClause();
if (!sfFuncletParent.IsNull() && ExceptionTracker::IsUnwoundToTargetParentFrame(&m_crawl, sfFuncletParent))
{
break;
@@ -1787,9 +1785,12 @@ ProcessFuncletsForGCReporting:
m_sfFuncletParent = sfFuncletParent;
m_fProcessNonFilterFunclet = true;
m_fDidFuncletReportGCReferences = false;
+ fSkippingFunclet = true;
}
}
#endif // FEATURE_PAL
+
+ fRecheckCurrentFrame = false;
// Do we already have a reference to a funclet parent?
if (!m_sfFuncletParent.IsNull())
{
@@ -1994,6 +1995,7 @@ ProcessFuncletsForGCReporting:
// Since we are in GC reference reporting mode,
// then avoid code duplication and go to
// funclet processing.
+ fRecheckCurrentFrame = true;
goto ProcessFuncletsForGCReporting;
}
}
@@ -2099,6 +2101,7 @@ ProcessFuncletsForGCReporting:
// If we are in GC reference reporting mode,
// then avoid code duplication and go to
// funclet processing.
+ fRecheckCurrentFrame = true;
goto ProcessFuncletsForGCReporting;
}
else