Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Read out of buffer" in DecodeForwardIteratorRecord #152

Open
jnm2 opened this issue Mar 21, 2019 · 3 comments
Open

"Read out of buffer" in DecodeForwardIteratorRecord #152

jnm2 opened this issue Mar 21, 2019 · 3 comments

Comments

@jnm2
Copy link

jnm2 commented Mar 21, 2019

One of the PDB's I'm processing throws this InvalidOperationException.

Microsoft.DiaSymReader.Converter.dll!Microsoft.CodeAnalysis.Debugging.CustomDebugInfoReader.ReadInt16(System.Collections.Immutable.ImmutableArray<byte> bytes, ref int offset) Line 551	C#
Microsoft.DiaSymReader.Converter.dll!Microsoft.CodeAnalysis.Debugging.CustomDebugInfoReader.DecodeForwardIteratorRecord(System.Collections.Immutable.ImmutableArray<byte> bytes) Line 209	C#
Microsoft.DiaSymReader.Converter.dll!Microsoft.DiaSymReader.Tools.PdbConverterWindowsToPortable.Convert(Microsoft.DiaSymReader.ISymUnmanagedReader5 symReader, System.Reflection.PortableExecutable.PEReader peReader, System.IO.Stream targetPdbStream, System.Reflection.Metadata.BlobContentId pdbId) Line 311	C#
Microsoft.DiaSymReader.Converter.dll!Microsoft.DiaSymReader.Tools.PdbConverterWindowsToPortable.Convert(System.Reflection.PortableExecutable.PEReader peReader, System.IO.Stream sourcePdbStream, System.IO.Stream targetPdbStream) Line 55	C#
Microsoft.DiaSymReader.Converter.dll!Microsoft.DiaSymReader.Tools.PdbConverter.ConvertWindowsToPortable(System.Reflection.PortableExecutable.PEReader peReader, System.IO.Stream sourcePdbStream, System.IO.Stream targetPdbStream) Line 91	C#

This is the line:

dynamicLocals = CustomDebugInfoReader.DecodeDynamicLocalsRecord(record.Data);

I'm not seeing a file for Microsoft.CodeAnalysis.Debugging.CustomDebugInfoReader in this repo somehow even though it's in Microsoft.DiaSymReader.Converter.dll.

It's a Windows PDB. I can share it privately. I wouldn't expect it to be invalid because was compiled recently by a major software tools vendor.

@tmat
Copy link
Member

tmat commented Mar 21, 2019

It's linked in from a source package published from Roslyn repo. You should be able to step thru and let Source Link fetch the source :)

It is possible that older Windows PDBs might have bad debug info. We have had bugs in the compiler/pdb writer. If you can share the PDB, please send me a link to tomat microsoft com

@jnm2
Copy link
Author

jnm2 commented Mar 21, 2019

I had stepped through but I wasn't sure which repo to look in. That makes sense.

Emailed, thank you!

@tmat
Copy link
Member

tmat commented Mar 21, 2019

Got it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants