diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-03-21 15:37:39 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-03-21 15:37:39 +0000 |
commit | 0dc47b652dfbe0d61d153eded02bae9487a7b539 (patch) | |
tree | 3bf128829ebe837e34586df47fd62420f57b7ae6 /lib/tsan/rtl/tsan_rtl_report.cc | |
parent | f63dde3594da0dba4c8039f0cb3a4196a76f1aff (diff) | |
download | compiler-rt-0dc47b652dfbe0d61d153eded02bae9487a7b539.tar.gz compiler-rt-0dc47b652dfbe0d61d153eded02bae9487a7b539.tar.bz2 compiler-rt-0dc47b652dfbe0d61d153eded02bae9487a7b539.tar.xz |
tsan: better reporting for races on vptr
explicitly say "ctor/dtor vs virtual call"
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl_report.cc')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl_report.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tsan/rtl/tsan_rtl_report.cc b/lib/tsan/rtl/tsan_rtl_report.cc index 18ab18e0..50c53117 100644 --- a/lib/tsan/rtl/tsan_rtl_report.cc +++ b/lib/tsan/rtl/tsan_rtl_report.cc @@ -616,7 +616,12 @@ void ReportRace(ThreadState *thr) { Context *ctx = CTX(); ThreadRegistryLock l0(ctx->thread_registry); - ScopedReport rep(freed ? ReportTypeUseAfterFree : ReportTypeRace); + ReportType typ = ReportTypeRace; + if (thr->is_vptr_access) + typ = ReportTypeVptrRace; + else if (freed) + typ = ReportTypeUseAfterFree; + ScopedReport rep(typ); const uptr kMop = 2; StackTrace traces[kMop]; const uptr toppc = TraceTopPC(thr); |