[PATCH] D146621: [sanitizer][win] Change cmdline check to allow double backslashs
Alvin Wong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 07:25:47 PDT 2023
alvinhochun updated this revision to Diff 507355.
alvinhochun edited the summary of this revision.
alvinhochun added a comment.
Reworded commit a bit and changed the report_after_syminitialize test to test with double backslashes in the symbolizer path.
I did test this patch manually, but I don't have an environment for running the lit test so I may have to ask @mstorsjo to try that. Sorry to bother you :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146621/new/
https://reviews.llvm.org/D146621
Files:
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp
compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
Index: compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
===================================================================
--- compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
+++ compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cpp
@@ -1,5 +1,5 @@
// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=external_symbolizer_path=asdf not %run %t 2>&1 | FileCheck %s
+// RUN: %env_asan_opts=external_symbolizer_path=non-existent\\\\asdf not %run %t 2>&1 | FileCheck %s
#include <windows.h>
#include <dbghelp.h>
Index: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp
@@ -231,8 +231,6 @@
// Check that tool command lines are simple and that complete escaping is
// unnecessary.
CHECK(!internal_strchr(arg, '"') && "quotes in args unsupported");
- CHECK(!internal_strstr(arg, "\\\\") &&
- "double backslashes in args unsupported");
CHECK(arglen > 0 && arg[arglen - 1] != '\\' &&
"args ending in backslash and empty args unsupported");
command_line.append("\"%s\" ", arg);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146621.507355.patch
Type: text/x-patch
Size: 1302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230322/55e9f101/attachment.bin>
More information about the llvm-commits
mailing list