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

Fix DecodeForwardIteratorRecord to accept strings w/o null terminator #64349

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

tmat
Copy link
Member

@tmat tmat commented Sep 28, 2022

The CDI is not used by Roslyn EE. It is still decoded by Pdb2Xml tool which is using this helper and this fix allows Pdb2Xml to decode the data successfully.

@tmat tmat requested a review from a team as a code owner September 28, 2022 20:56
@tmat
Copy link
Member Author

tmat commented Sep 28, 2022

@cston PTAL

public void DecodeForwardIteratorRecord(byte[] bytes, string expected)
{
Assert.Equal(expected, CustomDebugInfoReader.DecodeForwardIteratorRecord(bytes.ToImmutableArray()));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

Consider testing with one or more characters and no null terminator as well.

@tmat tmat enabled auto-merge (squash) October 10, 2022 20:14
@tmat tmat merged commit 7c6ddf8 into dotnet:main Oct 10, 2022
@ghost ghost added this to the Next milestone Oct 10, 2022
@tmat tmat deleted the DecodeForwardIteratorRecord branch October 10, 2022 22:07
@RikkiGibson RikkiGibson modified the milestones: Next, 17.5 P1 Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants