diff options
author | Ismail Pazarbasi <ismail.pazarbasi@gmail.com> | 2015-11-11 02:38:38 +0000 |
---|---|---|
committer | Ismail Pazarbasi <ismail.pazarbasi@gmail.com> | 2015-11-11 02:38:38 +0000 |
commit | 2ee17a6b61c600410dbe80521dfa94b1676efcc5 (patch) | |
tree | f8260448cb28e6f36deaba79113fcdb15ed82c8f /lib | |
parent | e6aff8f9056b48ac31a1114743471d49ce0b7beb (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tsan/rtl/tsan_report.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tsan/rtl/tsan_report.cc b/lib/tsan/rtl/tsan_report.cc index f4b06878a..ad8fc9a20 100644 --- a/lib/tsan/rtl/tsan_report.cc +++ b/lib/tsan/rtl/tsan_report.cc @@ -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"); |