Revert "Workaround bogus Thread Safety Analysis warning"
Alter the thread safety analysis attribute of ReaderWriterLock::AssertNotHeld
so that it accurately expresses "lock not held either exclusively or shared".
Re-enable Locks::mutator_lock_->AssertNotHeld runtime checks in heap.cc
and adbconnection.cc.
This reverts commit e11d50f23dc1256ad933d209f2db8f58138f02c0.
Bug: 71769596
Change-Id: I94488ad5f977b0de13a5141c54f67272a41f8b53
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index e1b5b62..db65d9c 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -550,10 +550,7 @@
void AdbConnectionState::RunPollLoop(art::Thread* self) {
CHECK_NE(agent_name_, "");
CHECK_EQ(self->GetState(), art::kNative);
- // TODO: Clang prebuilt for r316199 produces bogus thread safety analysis warning for holding both
- // exclusive and shared lock in the same scope. Remove the assertion as a temporary workaround.
- // http://b/71769596
- // art::Locks::mutator_lock_->AssertNotHeld(self);
+ art::Locks::mutator_lock_->AssertNotHeld(self);
self->SetState(art::kWaitingInMainDebuggerLoop);
// shutting_down_ set by StopDebuggerThreads
while (!shutting_down_) {