Skip to content

Commit 3812e13

Browse files
github-actions[bot]lambdageekjeffschwMSFT
authored
[aot] mono_aot_split_options: reset state after a backslash (#108212)
Fixes #108066 Co-authored-by: Aleksey Kliger <[email protected]> Co-authored-by: Jeff Schwartz <[email protected]>
1 parent 0277184 commit 3812e13

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/mono/mono/mini/aot-compiler.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8746,8 +8746,14 @@ mono_aot_split_options (const char *aot_options)
87468746
g_return_val_if_fail (aot_options != NULL, NULL);
87478747

87488748
while ((cur = *aot_options) != '\0') {
8749-
if (state == MONO_AOT_OPTION_STATE_ESCAPE)
8749+
if (state == MONO_AOT_OPTION_STATE_ESCAPE) {
8750+
// After the escaped character, we're back inside quotes
8751+
//
8752+
// Note: we don't seem to remove the "" or the \ from the option here.
8753+
// Perhaps the caller is expected to take care of it?
8754+
state = MONO_AOT_OPTION_STATE_STRING;
87508755
goto next;
8756+
}
87518757

87528758
switch (cur) {
87538759
case '"':

0 commit comments

Comments
 (0)