-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix unhandled exception test for interpreter #121397
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 unhandled exception test for interpreter #121397
Conversation
The test was accepting only 0xc0000005 as an exit code for NullReferenceException. But in the interpreter case, the exception is thrown using COMPlusThrow(kNullReferenceException) and gets the error code of regular managed exception, the 0xE0434352. This change updates the test to accept that one too and adds verification that the exception message contains the System.NullReferenceException to make sure the tested app didn't exit due to some other exception.
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
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.
Pull Request Overview
This PR modifies the unhandled exception test to accept multiple valid exit codes for hardware exception tests on Windows. The key change allows the test to pass when the test process exits with either the hardware exception code (0xC0000005 for null reference) or the managed exception code (0xE0434352), accounting for variations in how hardware exceptions are reported.
- Changed from single expected exit code to an array of expected exit codes
- Updated hardware exception handling on Windows to accept both 0xC0000005 and 0xE0434352
- Added validation for NullReferenceException message in Mono runtime hardware exception tests
Feedback and fix Mono error message check for NullReferenceException Co-authored-by: Copilot <[email protected]>
The test was accepting only 0xc0000005 as an exit code for NullReferenceException. But in the interpreter case, the exception is thrown using COMPlusThrow(kNullReferenceException) and gets the error code of regular managed exception, the 0xE0434352.
This change updates the test to accept that one too and adds verification that the exception message contains the System.NullReferenceException to make sure the tested app didn't exit due to some other exception.