[compiler-rt] r258021 - [tsan] Do nothing in ScopedInterceptor's destructor if thr is not inited.
Yabin Cui via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 17 13:33:43 PST 2016
Author: yabinc
Date: Sun Jan 17 15:33:42 2016
New Revision: 258021
URL: http://llvm.org/viewvc/llvm-project?rev=258021&view=rev
Log:
[tsan] Do nothing in ScopedInterceptor's destructor if thr is not inited.
Summary:
It is part of http://reviews.llvm.org/D15301, but missed when I committed
that patch.
Reviewers: kubabrecka, kcc, eugenis, llvm-commits, dvyukov
Differential Revision: http://reviews.llvm.org/D16235
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=258021&r1=258020&r2=258021&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Sun Jan 17 15:33:42 2016
@@ -289,6 +289,8 @@ ScopedInterceptor::ScopedInterceptor(Thr
}
ScopedInterceptor::~ScopedInterceptor() {
+ if (!thr_->is_inited)
+ return;
if (flags()->ignore_interceptors_accesses) ThreadIgnoreEnd(thr_, pc_);
if (in_ignored_lib_) {
thr_->in_ignored_lib = false;
More information about the llvm-commits
mailing list