diff options
author | 2014-12-09 13:33:38 +0000 | |
---|---|---|
committer | 2014-12-09 13:33:38 +0000 | |
commit | db978719dbcb73fc6acfd193561445c4462786b8 (patch) | |
tree | be75911bfbe29a50fff685217c8ee155fb99ac10 /runtime/base/mutex-inl.h | |
parent | 015b137efb434528173779bc3ec8d72494456254 (diff) |
Revert "Tidy gAborting."
Creates infinite loop: b/18674776.
This reverts commit 015b137efb434528173779bc3ec8d72494456254.
Change-Id: I67fe310d2e95ee2ec37bec842be06fb1123b6f4e
Diffstat (limited to 'runtime/base/mutex-inl.h')
-rw-r--r-- | runtime/base/mutex-inl.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h index 020634122e..cb698175df 100644 --- a/runtime/base/mutex-inl.h +++ b/runtime/base/mutex-inl.h @@ -97,7 +97,9 @@ inline void BaseMutex::RegisterAsLocked(Thread* self) { } } } - CHECK(!bad_mutexes_held); + if (gAborting == 0) { // Avoid recursive aborts. + CHECK(!bad_mutexes_held); + } } // Don't record monitors as they are outside the scope of analysis. They may be inspected off of // the monitor list. @@ -112,7 +114,7 @@ inline void BaseMutex::RegisterAsUnlocked(Thread* self) { return; } if (level_ != kMonitorLock) { - if (kDebugLocking) { + if (kDebugLocking && gAborting == 0) { // Avoid recursive aborts. CHECK(self->GetHeldMutex(level_) == this) << "Unlocking on unacquired mutex: " << name_; } self->SetHeldMutex(level_, NULL); @@ -176,7 +178,7 @@ inline bool Mutex::IsExclusiveHeld(const Thread* self) const { bool result = (GetExclusiveOwnerTid() == SafeGetTid(self)); if (kDebugLocking) { // Sanity debug check that if we think it is locked we have it in our held mutexes. - if (result && self != NULL && level_ != kMonitorLock) { + if (result && self != NULL && level_ != kMonitorLock && !gAborting) { CHECK_EQ(self->GetHeldMutex(level_), this); } } |