Correctly initialize monitors for 32-bit
Fully initialize lock_owner... fields. The only one that's critical
here is the lock_owner_ field itself, but let's be consistent.
A randomly set lock_owner_ field can cause GetLockOwnerInfo() to
spin indefinitely.
Bug: 148094637
Test: TreeHugger
Change-Id: I50cab5ba412a2a8113e44c5f05c2990c5d7d101f
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 6b05e28..8190960 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -99,8 +99,11 @@
wait_set_(nullptr),
wake_set_(nullptr),
hash_code_(hash_code),
+ lock_owner_(nullptr),
lock_owner_method_(nullptr),
lock_owner_dex_pc_(0),
+ lock_owner_sum_(0),
+ lock_owner_request_(nullptr),
monitor_id_(MonitorPool::ComputeMonitorId(this, self)) {
#ifdef __LP64__
DCHECK(false) << "Should not be reached in 64b";
@@ -126,6 +129,9 @@
wake_set_(nullptr),
hash_code_(hash_code),
lock_owner_(nullptr),
+ lock_owner_method_(nullptr),
+ lock_owner_dex_pc_(0),
+ lock_owner_sum_(0),
lock_owner_request_(nullptr),
monitor_id_(id) {
#ifdef __LP64__