[compiler-rt] r252695 - [tsan] Pass correct interposed function prefix to report function
Ismail Pazarbasi via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 18:38:38 PST 2015
Author: ismailp
Date: Tue Nov 10 20:38:38 2015
New Revision: 252695
URL: http://llvm.org/viewvc/llvm-project?rev=252695&view=rev
Log:
[tsan] Pass correct interposed function prefix to report function
Summary:
On Darwin, interposed functions are prefixed with "wrap_". On Linux,
they are prefixed with "__interceptor_".
Reviewers: dvyukov, samsonov, glider, kcc, kubabrecka
Subscribers: zaks.anna, llvm-commits
Differential Revision: http://reviews.llvm.org/D14512
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc?rev=252695&r1=252694&r2=252695&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc Tue Nov 10 20:38:38 2015
@@ -19,6 +19,12 @@
namespace __tsan {
+#if SANITIZER_MAC
+static const char *const kInterposedFunctionPrefix = "wrap_";
+#else
+static const char *const kInterposedFunctionPrefix = "__interceptor_";
+#endif
+
ReportStack::ReportStack() : frames(nullptr), suppressable(false) {}
ReportStack *ReportStack::New() {
@@ -121,7 +127,7 @@ void PrintStack(const ReportStack *ent)
InternalScopedString res(2 * GetPageSizeCached());
RenderFrame(&res, common_flags()->stack_trace_format, i, frame->info,
common_flags()->symbolize_vs_style,
- common_flags()->strip_path_prefix, "__interceptor_");
+ common_flags()->strip_path_prefix, kInterposedFunctionPrefix);
Printf("%s\n", res.data());
}
Printf("\n");
More information about the llvm-commits
mailing list