summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2025-01-29 12:37:03 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-01-29 12:37:03 -0800
commit1a04aeb4718a9ca6ba5640b21392bae2d114b157 (patch)
tree35eb2e9a9e9b983b2f95179a9392f4f7e93b6289
parentee5d81737809fa7a316c2ccf5819a5e7b567b3dd (diff)
parentb580472bc7112094e6782a7df7e20ad7e32fc7ea (diff)
Add ConditionVariable debugging checks am: 22a222b0ed am: b580472bc7
Original change: https://android-review.googlesource.com/c/platform/art/+/3466538 Change-Id: I9bdf996638499d1897f6e766c81ecb32c412f84b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--runtime/base/mutex.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc
index 26a665bd41..9d7b20052b 100644
--- a/runtime/base/mutex.cc
+++ b/runtime/base/mutex.cc
@@ -1023,6 +1023,7 @@ void ReaderWriterMutex::WakeupToRespondToEmptyCheckpoint() {
ConditionVariable::ConditionVariable(const char* name, Mutex& guard)
: name_(name), guard_(guard) {
+ DCHECK(name != nullptr);
#if ART_USE_FUTEXES
DCHECK_EQ(0, sequence_.load(std::memory_order_relaxed));
num_waiters_ = 0;
@@ -1120,7 +1121,7 @@ void ConditionVariable::WaitHoldingLocks(Thread* self) {
// EAGAIN == EWOULDBLK, so we let the caller try again.
// EINTR implies a signal was sent to this thread.
if ((errno != EINTR) && (errno != EAGAIN)) {
- PLOG(FATAL) << "futex wait failed for " << name_;
+ PLOG(FATAL) << "futex wait failed for " << name_ << ": " << strerror(errno);
}
}
SleepIfRuntimeDeleted(self);