-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix exception leaking from filter in nativeAOT #85366
Fix exception leaking from filter in nativeAOT #85366
Conversation
There is a bug in handling exceptions that occur in exception filters in nativeAOT. If such exception is not handled in the filter, it needs to be swallowed and the filter should behave as if it returned `false`. Instead of that, the current behavior is that debug build of the runtime asserts and the release build fails fast without any message. This change fixes it by catching the exception in the exception handling code. It was also necessary to modify the stack frame iterator to let it unwind past the filter funclet instead of failing fast.
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThere is a bug in handling exceptions that occur in exception filters in nativeAOT. If such exception is not handled in the filter, it needs to be swallowed and the filter should behave as if it returned This change fixes it by catching the exception in the exception handling code. It was also necessary to modify the stack frame iterator to let it unwind past the filter funclet instead of failing fast.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs
Show resolved
Hide resolved
Test failure is a known issue: #84821 |
There is a bug in handling exceptions that occur in exception filters in nativeAOT. If such exception is not handled in the filter, it needs to be swallowed and the filter should behave as if it returned
false
. Instead of that, the current behavior is that debug build of the runtime asserts and the release build fails fast without any message.This change fixes it by catching the exception in the exception handling code. It was also necessary to modify the stack frame iterator to let it unwind past the filter funclet instead of failing fast.
Close dotnet/runtimelab#188