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

Is 'sb.AppendFormat($"{Signature.ParameterTypes[i]}");' a typo error #62137

Closed
wwh1004 opened this issue Nov 29, 2021 · 3 comments · Fixed by #62147
Closed

Is 'sb.AppendFormat($"{Signature.ParameterTypes[i]}");' a typo error #62137

wwh1004 opened this issue Nov 29, 2021 · 3 comments · Fixed by #62147
Assignees
Labels
area-R2RDump-coreclr Ready-to-run image dump tool help wanted [up-for-grabs] Good issue for external contributors untriaged New issue has not been triaged by the area owner

Comments

@wwh1004
Copy link

wwh1004 commented Nov 29, 2021

I use ILSpy to see r2r code. ILSpy uses 'ILCompiler.Reflection.ReadyToRun' and it throws format exception.

image

sb.AppendFormat($"{Signature.ParameterTypes[i]}");

sb.AppendFormat($"{Signature.ParameterTypes[i]}");

For obfuscated code, 'AppendFormat' always fails. And it makes no sense to regard a type name as a string format. So is 'sb.AppendFormat($"{Signature.ParameterTypes[i]}");' a typo error?

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Reflection untriaged New issue has not been triaged by the area owner labels Nov 29, 2021
@jkotas jkotas added area-R2RDump-coreclr Ready-to-run image dump tool help wanted [up-for-grabs] Good issue for external contributors and removed area-System.Reflection labels Nov 29, 2021
@jkotas
Copy link
Member

jkotas commented Nov 29, 2021

Yes, it looks like a bug. Would you be interested in submitting a PR with the fix?

@stephentoub
Copy link
Member

So is 'sb.AppendFormat($"{Signature.ParameterTypes[i]}");' a typo error?

Looks like it should just be "Append" instead of "AppendFormat".

@wwh1004
Copy link
Author

wwh1004 commented Nov 29, 2021

I think you can fix it better. I don’t know if there are only these two typo errors.

@stephentoub stephentoub self-assigned this Nov 29, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 29, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 1, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-R2RDump-coreclr Ready-to-run image dump tool help wanted [up-for-grabs] Good issue for external contributors untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants