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 | fcb8c7e4072cc754ed473d0d30e8167c00daaaa2 (patch) | |
| tree | cbf9a0ae678e697e3e315a7ab0bf22eff6316ddf /compiler-rt | |
| parent | 4042d91b63cb3e2900ec2b1d2a08598a9638cd77 (diff) | |
| download | bcm5719-llvm-fcb8c7e4072cc754ed473d0d30e8167c00daaaa2.tar.gz bcm5719-llvm-fcb8c7e4072cc754ed473d0d30e8167c00daaaa2.zip | |
[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
llvm-svn: 252695
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_report.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cc b/compiler-rt/lib/tsan/rtl/tsan_report.cc index f4b06878a58..ad8fc9a2083 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_report.cc +++ b/compiler-rt/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"); |

