Emit platform-native line endings in requesting assembly chain#127945
Open
Emit platform-native line endings in requesting assembly chain#127945
Conversation
…uction and remove managed ReplaceLineEndings() normalization Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/f53f4e08-76fb-4fb1-bfb2-c79be29bf11e Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
MichalStrehovsky
approved these changes
May 8, 2026
Member
Size statisticsPull request #127945
|
Contributor
|
Tagging subscribers to this area: @agocke, @elinor-fung |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the requesting-assembly chain string use platform-native newlines at the point it’s constructed in CoreCLR native code, allowing the managed ToString() overrides to emit _requestingAssemblyChain as-is (without later line-ending normalization).
Changes:
- Updated
AppDomain::GetParentAssemblyChainto append\r\non Windows and\non Unix before each" --> "continuation. - Removed
_requestingAssemblyChain.ReplaceLineEndings()fromToString()inBadImageFormatException,FileLoadException, andFileNotFoundException.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/coreclr/vm/appdomain.cpp | Emits platform-native newlines when appending " --> " entries to the requesting-assembly chain. |
| src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs | Stops normalizing requesting-chain line endings during ToString(). |
| src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs | Stops normalizing requesting-chain line endings during ToString(). |
| src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs | Stops normalizing requesting-chain line endings during ToString(). |
This was referenced May 8, 2026
Open
elinor-fung
approved these changes
May 8, 2026
Member
|
/ba-g filed #127992 on the failure, can't seem to be able to rerun build analysis to pick it up |
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.
appdomain.cppto use\r\non Windows,\non UnixReplaceLineEndings()calls fromBadImageFormatException.ToString(),FileLoadException.ToString(), andFileNotFoundException.ToString()MissingTransitiveDependency_ShowsRequestingAssemblyChaintest - passes (39/39)Original prompt
This pull request was created from Copilot chat.