-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New exception handling diagnostic fixes #96065
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change * Adds debugger and profiler events in the right places and order * Adds debugger exception interception implementation * Ensures that the new managed exceptino handling frames are not visible to the debugger stack trace * Fixes some missing frames on stack traces (coming from HelperMethodFrame) * Moves first chance exception handling to the native code. It is necessary to ensure that the exception stack trace contains frames from the explicit frames that have MethodDesc at the time the event fires. * Makes some refactoring around the ExInfo - the CONTEXT and REGDISPLAY are now in the ExInfo, the ExInfo contains the original exception pointers. * Fixes one case when an UnhandledException at the boundary of managed and native code was not handled correctly. * Changes the way an unhandled exception in exception filter is swallowed. The stack frame iterator was having issues with the fact that the exception "leaked" from the actual filter and was caught by another filter in the managed EH. Now the exception is always swallowed at the filter.
c024855 to
102ab95
Compare
Member
|
@tommcdon @dotnet/dotnet-diag-contrib |
Member
jkotas
reviewed
Dec 15, 2023
src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs
Outdated
Show resolved
Hide resolved
This was referenced Dec 15, 2023
583f180 to
73c5c49
Compare
jkotas
reviewed
Dec 18, 2023
jkotas
reviewed
Dec 18, 2023
jkotas
approved these changes
Dec 18, 2023
d0eb3b4 to
d8383bb
Compare
Slight modification of the code enables second pass for unhandled exceptions. That makes finallys get called the same way as without the new exception handling.
tommcdon
approved these changes
Dec 22, 2023
Member
tommcdon
left a comment
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.
LGTM, thanks!
This was referenced Dec 23, 2023
Member
Author
|
The windows arm64 nativeaot leg failure is a known issue |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change makes the new exception handling pass all the mdbg tests (tested on Windows x64, Linux x64 and Linux arm64) except for the Exceptions.ReflectionTest that will require a change in the test.
Here is a list of changes:
HelperMethodFrame)MethodDescat the time the event fires.ExInfo- theCONTEXTandREGDISPLAYare now in theExInfo, theExInfonow also contains the original exception pointers.