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 ilasm parsing of defines #42002

Merged
merged 2 commits into from
Sep 9, 2020
Merged

Fix ilasm parsing of defines #42002

merged 2 commits into from
Sep 9, 2020

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Sep 9, 2020

Regression introduced by #41611

Fixes #42001

@jkotas
Copy link
Member Author

jkotas commented Sep 9, 2020

cc @am11

@am11
Copy link
Member

am11 commented Sep 9, 2020

Ah, so this is a case of ANSI string, which we decided not to support / care about in ilasm, but it turned out we do need to support it.

@@ -924,10 +924,6 @@ int yylex()
tok = parse_literal(curSym, curPos, FALSE);
if(tok == QSTRING)
{
// insert UTF-8 BOM prefix
Copy link
Member

Choose a reason for hiding this comment

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

Will strings encoded in UTF-8 still work?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was not able to figure out what this was supposed to help with. Non-ASCII QSTRINGs (quoted strings) never worked in this position as far as I can tell. The following:

#define NAME "ššš"

.assembly NAME

fails in all .NET Framework and earlier .NET Core versions of ilasm. The case that this change is fixing is:

#define NAME "sss"

.assembly NAME

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks for the details.

@JulieLeeMSFT
Copy link
Member

Are we going to backport it to RC2? or Will this be .NET6 fix?

@jkotas
Copy link
Member Author

jkotas commented Sep 9, 2020

This is .NET 6 only regression. No backporting necessary.

@jkotas jkotas merged commit ded9f9d into dotnet:master Sep 9, 2020
@jkotas jkotas deleted the ilasm-fix branch September 9, 2020 19:07
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to consume latest dotnet/runtime
5 participants