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

[aot] mono_aot_split_options handles \ incorrectly #108066

Closed
lambdageek opened this issue Sep 20, 2024 · 1 comment · Fixed by #108067
Closed

[aot] mono_aot_split_options handles \ incorrectly #108066

lambdageek opened this issue Sep 20, 2024 · 1 comment · Fixed by #108067
Labels
area-Codegen-AOT-mono in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@lambdageek
Copy link
Member

The idea is that you can pass an option like --aot=foo=bar,baz="abc\"def\",xyz=012 and the AOT compiler will see options foo=bar, baz=abc"def and zyx=012.

But this line that is supposed to handle the character following a \ is wrong

if (state == MONO_AOT_OPTION_STATE_ESCAPE)
goto next;

it never resets the state back to MONO_AOT_OPTION_STATE_STRING, so everything after the \ until the end of the options is treated as a single long option: foo=bar, baz=abc\"def",xyz=012

Also the \ is itself never removed from the option - instead of bar=abc"def we get bar=abc\"def. (And this is a hard problem because we woudl need to copy or modify the string, which we don't otherwise do)

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Sep 20, 2024
@lambdageek lambdageek removed the untriaged New issue has not been triaged by the area owner label Sep 20, 2024
@lambdageek lambdageek added this to the 10.0.0 milestone Sep 20, 2024
@lambdageek
Copy link
Member Author

Not a regression, this seems to go back all the way to ~2015

lambdageek added a commit to lambdageek/runtime that referenced this issue Sep 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Sep 20, 2024
jeffschwMSFT added a commit that referenced this issue Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-AOT-mono in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant