diff options
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); } } |