Fix unhandled exception test for interpreter#121397
Merged
janvorli merged 3 commits intodotnet:mainfrom Nov 7, 2025
Merged
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.
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Contributor
There was a problem hiding this comment.
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
davidwrighton
approved these changes
Nov 6, 2025
3 tasks
janvorli
commented
Nov 6, 2025
Feedback and fix Mono error message check for NullReferenceException Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
janvorli
commented
Nov 6, 2025
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
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.
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.