Fix embedded source decoding on big-endian platforms in DiaSymReader#386
Merged
tmat merged 2 commits intodotnet:mainfrom Feb 11, 2026
Merged
Fix embedded source decoding on big-endian platforms in DiaSymReader#386tmat merged 2 commits intodotnet:mainfrom
tmat merged 2 commits intodotnet:mainfrom
Conversation
tmat
reviewed
Feb 9, 2026
tmat
approved these changes
Feb 11, 2026
Member
|
Thanks for the fix! |
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.
SymUnmanagedExtensions.GetEmbeddedSourcefails to decode embedded sources from Portable PDBs on big-endian architectures withSystem.IO.InvalidDataException: Found invalid data while decoding.It could also be seen to fail on this test case on big-endian systems:
Microsoft.CodeAnalysis.VisualBasic.UnitTests.PDB.PDBEmbeddedSourceTests.StandalonePdb.Portable PDB embedded source blobs begin with a little-endian 32-bit uncompressed length, followed by compressed or raw data. BitConverter interprets values using the host architecture endianness. On big-endian systems this reverses the byte order, producing an invalid length and causing decompression to fail.