summaryrefslogtreecommitdiffstats
path: root/runtime/lock_word-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lock_word-inl.h')
-rw-r--r--runtime/lock_word-inl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lock_word-inl.h b/runtime/lock_word-inl.h
index 414b3bb3e1..cf6f83cb62 100644
--- a/runtime/lock_word-inl.h
+++ b/runtime/lock_word-inl.h
@@ -50,6 +50,7 @@ inline LockWord::LockWord() : value_(0) {
inline LockWord::LockWord(Monitor* mon)
: value_(mon->GetMonitorId() | (kStateFat << kStateShift)) {
DCHECK_EQ(FatLockMonitor(), mon);
+ DCHECK_LE(mon->GetMonitorId(), static_cast<uint32_t>(kMaxMonitorId));
}
inline int32_t LockWord::GetHashCode() const {