Repository navigation
Fix SmtpFailedRecipientsException constructor base null dereference - #138297
Merged
Merged
Conversation
This constructor reads `innerExceptions` in `base` before `ArgumentNullException.ThrowIfNull(innerExceptions);` is reached.
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
MihaZupan
approved these changes
Nov 25, 2026
MihaZupan
enabled auto-merge (squash)
November 25, 2026 17:52
wfurt
approved these changes
Nov 25, 2026
Member
|
/ba-g #138301 |
3 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 constructor reads
innerExceptionsinbasebeforeArgumentNullException.ThrowIfNull(innerExceptions);is reached, so it fails inbaseinstead of failing in the intendedArgumentNullException.ThrowIfNull(innerExceptions);.An alternative fix would be to move this logic into the function body, outside of
base. I kept it as-is because adding?is a simpler change and fits the style of this file, but let me know if that's desired.Minimal reproduction project: smtp-failedrecipients-null.zip
AI usage disclaimer: I encountered these .NET runtime bugs when using an AI to work on an unrelated project. I had it fix the bugs as it went, and now I am submitting fixes to each after manually reviewing the changes, and fixing them as needed. Most of these lines of code are AI-generated, including the tests and the MRP. The PR description and commit message are entirely human-written, as is always the case with every PR I open.