aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlvin Wong <alvin@alvinhc.com>2023-03-22 18:14:40 +0800
committerAlvin Wong <alvin@alvinhc.com>2023-03-24 22:59:45 +0800
commitb1871ceb1cf6c6954380867d41db3812e9e0dbfc (patch)
treef300d114ceb7c303a7783ddc0352852b705d705f /flang/lib/Frontend/CompilerInvocation.cpp
parent125a37e09ba6e60495e1c0fa4c1b5ea05478a4b6 (diff)
downloadllvm-b1871ceb1cf6c6954380867d41db3812e9e0dbfc.zip
llvm-b1871ceb1cf6c6954380867d41db3812e9e0dbfc.tar.gz
llvm-b1871ceb1cf6c6954380867d41db3812e9e0dbfc.tar.bz2
[sanitizer][win] Change cmdline check to allow double backslashs
When `llvm-symbolizer.exe` is on the PATH in an entry containing two consecutive backslashes, sanitizers will try to launch llvm-symbolizer with its absolute path containing these consecutive backslashes. This fails a sanity check in `sanitizer_symbolizer_win.cpp`. According to the documentation of `CommandLineToArgvW` [1] and a MS blog post [2], backslashes in general, regardless of how many of them in a row, do not have any special effect, unless when immediately followed by a double quote. There already exists a check that fails when the command line arguments contains double quote, therefore the check for double backslashes can simply be removed. [1]: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw [2]: https://learn.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way Differential Revision: https://reviews.llvm.org/D146621
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions