From: Marco Elver Date: Thu, 25 May 2023 11:04:43 +0000 (+0200) Subject: [sanitizer_common] Fix StripFunctionName() on Windows X-Git-Tag: upstream/17.0.6~7234 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c46c7cef3791a410cf226f7f005231be35dd8b9;p=platform%2Fupstream%2Fllvm.git [sanitizer_common] Fix StripFunctionName() on Windows Also implement StripFunctionName() on Windows to properly strip interceptor prefixes. Reported-by: https://lab.llvm.org/buildbot#builders/127/builds/48810 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp index 2285ad8..1096d21 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp @@ -32,6 +32,9 @@ const char *StripFunctionName(const char *function) { if (SANITIZER_APPLE) { if (const char *s = try_strip("wrap_")) return s; + } else if (SANITIZER_WINDOWS) { + if (const char *s = try_strip("__asan_wrap_")) + return s; } else { if (const char *s = try_strip("__interceptor_")) return s;