[compiler-rt] 61da95e - tsan: prevent insertion of memset into BenignRaceImpl
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 31 00:17:20 PDT 2021
Author: Dmitry Vyukov
Date: 2021-07-31T09:17:14+02:00
New Revision: 61da95e8a16a71b58661af6d4c33975cb6aa9568
URL: https://github.com/llvm/llvm-project/commit/61da95e8a16a71b58661af6d4c33975cb6aa9568
DIFF: https://github.com/llvm/llvm-project/commit/61da95e8a16a71b58661af6d4c33975cb6aa9568.diff
LOG: tsan: prevent insertion of memset into BenignRaceImpl
Some bots started failing with the following error
after changing Alloc to New. Change it back.
ThreadSanitizer: CHECK failed: ((locked[i].recursion)) == ((0))
4 __sanitizer::CheckedMutex::CheckNoLocks()
5 __tsan::ScopedInterceptor::~ScopedInterceptor()
6 memset
7 __tsan::New<__tsan::ExpectRace>()
8 __tsan::AddExpectRace()
9 BenignRaceImpl()
Differential Revision: https://reviews.llvm.org/D107212
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp b/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp
index 9b393dbdfe1f..6bd72e18d942 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp
@@ -88,7 +88,7 @@ static void AddExpectRace(ExpectRace *list,
return;
}
}
- race = New<ExpectRace>();
+ race = static_cast<ExpectRace *>(Alloc(sizeof(ExpectRace)));
race->addr = addr;
race->size = size;
race->file = f;
More information about the llvm-commits
mailing list