Repository navigation
Fix UTF-8 buffer sizing for fatal-error reports - #136666
Merged
AaronRobinsonMSFT merged 3 commits intoOct 30, 2026
Merged
AaronRobinsonMSFT merged 3 commits into
AaronRobinsonMSFT merged 3 commits into
Conversation
The console conversion helper assumes two bytes per UTF-16 code unit, which can underallocate for UTF-8 and omit text from fatal-error reports. Use a three-byte UTF-8 bound with overflow protection and exact sizing for other code pages. Add regression tests for messages and exception text. Co-authored-by: Copilot <[email protected]> Copilot-Session: f515d939-a74d-45af-a6be-0170c3f200e0
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 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: @dotnet/area-system-runtime |
Contributor
|
Tagging subscribers to this area: @agocke |
jkotas
reviewed
Oct 30, 2026
jkotas
reviewed
Oct 30, 2026
Inline exact-size conversion in PrintToStdErrW and remove its single-use macro, avoiding unnecessary allocation during fatal-error reporting. Move Unicode report coverage into the existing runtime crash tests. Co-authored-by: Copilot <[email protected]> Copilot-Session: f515d939-a74d-45af-a6be-0170c3f200e0
jkotas
approved these changes
Oct 30, 2026
Co-authored-by: Copilot <[email protected]> Copilot-Session: f515d939-a74d-45af-a6be-0170c3f200e0
Member
Author
|
@jkotas Need one more review. I disabled this test on mono instead of fixing it. |
jkotas
approved these changes
Oct 30, 2026
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.
The console conversion helper assumed two bytes per UTF-16 code unit. Three-byte UTF-8 text could fail conversion and disappear from fatal-error reports.
Inline exact-size, two-pass conversion in
PrintToStdErrWand remove the single-use macro. Move regression coverage into the runtime unhandled-exception tests.