[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
This commit is contained in:
Ismail Pazarbasi 2015-11-11 02:38:38 +00:00
parent 4042d91b63
commit fcb8c7e407
1 changed files with 7 additions and 1 deletions

View File

@ -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");