Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0] Remove managed EH code frames from stack trace #108831

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ internal object ThrownException
#if NATIVEAOT
[RuntimeExport("RhThrowHwEx")]
#endif
[StackTraceHidden]
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo)
{
#if NATIVEAOT
Expand Down Expand Up @@ -624,6 +625,7 @@ public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo)
#if NATIVEAOT
[RuntimeExport("RhThrowEx")]
#endif
[StackTraceHidden]
public static void RhThrowEx(object exceptionObj, ref ExInfo exInfo)
{
#if NATIVEAOT
Expand Down Expand Up @@ -705,6 +707,7 @@ public static void RhUnwindAndIntercept(ref ExInfo exInfo, UIntPtr interceptStac
#if NATIVEAOT
[RuntimeExport("RhRethrow")]
#endif
[StackTraceHidden]
public static void RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo)
{
#if NATIVEAOT
Expand All @@ -722,6 +725,7 @@ public static void RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo)
FallbackFailFast(RhFailFastReason.InternalError, null);
}

[StackTraceHidden]
private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExInfo exInfo)
{
Debug.Assert(exInfo._passNumber == 1, "expected asm throw routine to set the pass");
Expand Down Expand Up @@ -977,6 +981,7 @@ private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, I
prevFramePtr = curFramePtr;
}

[StackTraceHidden]
private static bool FindFirstPassHandler(object exception, uint idxStart,
ref StackFrameIterator frameIter, out uint tryRegionIdx, out byte* pHandler)
{
Expand Down Expand Up @@ -1134,6 +1139,7 @@ private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart)
{
InvokeSecondPass(ref exInfo, idxStart, MaxTryRegionIdx);
}

private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart, uint idxLimit)
{
EHEnum ehEnum;
Expand Down
Loading