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)
The idea is that you can pass an option like
--aot=foo=bar,baz="abc\"def\",xyz=012and the AOT compiler will see optionsfoo=bar,baz=abc"defandzyx=012.But this line that is supposed to handle the character following a
\is wrongruntime/src/mono/mono/mini/aot-compiler.c
Lines 8749 to 8750 in 68b90ac
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=012Also the
\is itself never removed from the option - instead ofbar=abc"defwe getbar=abc\"def. (And this is a hard problem because we woudl need to copy or modify the string, which we don't otherwise do)