[PATCH] D48052: [sanitizer] Don't treat colon before slash as a flag separator
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 14 10:10:12 PDT 2018
rnk added inline comments.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cc:77
+ // path separator. This avoids common portability issues when an unquoted
+ // Windows path is used, as in 'symbolizer_path=C:/foo/llvm-symbolizer.exe'.
+ // Since no option names should start with / or \, it should be unambiguous.
----------------
vitalybuka wrote:
> All these variables are mapped to the same C++ members. So not sure if it's worth it but what if we generalize to:
> ":" is separateor IFF it's followed by "[a-zA_Z0-9_]+="
>
I think that'll be too magic. Consider this case where the user just forgets to say "flag2" before "=":
flag1=val1:=val2:flag3=val3
We'll parse that as flag1="val1:=val2" and not give any errors. The same could be said with this if they add a slash after a colon that's supposed to be a separator, but hopefully it's not an issue in practice.
https://reviews.llvm.org/D48052
More information about the llvm-commits
mailing list