diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-05-12 10:47:11 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-05-12 14:59:31 -0700 |
commit | b43390cb87eace4a017f672d66cfb20fb9e76aa1 (patch) | |
tree | 7d4f2f0f0d0ad561f20cac4a2aa78cba9a477c78 /runtime/thread_state.h | |
parent | 28d332c720cb7c9c0163c4844bb0c1a2a067470e (diff) | |
download | art-b43390cb87eace4a017f672d66cfb20fb9e76aa1.tar.gz art-b43390cb87eace4a017f672d66cfb20fb9e76aa1.tar.bz2 art-b43390cb87eace4a017f672d66cfb20fb9e76aa1.zip |
Hold heap bitmap lock in Heap::GetObjectsAllocated
Fixes a race condition where add and remove space could cause a crash
when we iterated over the spaces.
TODO: Add a spaces lock or something to guard against this.
(cherry picked from commit a395c0a492079d86b312c9edc796d63001576954)
Bug: 21031927
Change-Id: I7f0d558316f8e9d9f22ffd182e8666355bf50d47
Diffstat (limited to 'runtime/thread_state.h')
-rw-r--r-- | runtime/thread_state.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/thread_state.h b/runtime/thread_state.h index b5479edb80..c7ea7f4381 100644 --- a/runtime/thread_state.h +++ b/runtime/thread_state.h @@ -42,6 +42,7 @@ enum ThreadState { kWaitingForDeoptimization, // WAITING TS_WAIT waiting for deoptimization suspend all kWaitingForMethodTracingStart, // WAITING TS_WAIT waiting for method tracing to start kWaitingForVisitObjects, // WAITING TS_WAIT waiting for visiting objects + kWaitingForGetObjectsAllocated, // WAITING TS_WAIT waiting for getting the number of allocated objects kStarting, // NEW TS_WAIT native thread started, not yet ready to run managed code kNative, // RUNNABLE TS_RUNNING running in a JNI native method kSuspended, // RUNNABLE TS_RUNNING suspended by GC or debugger |