summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2014-08-13 08:50:00 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-08-12 19:57:35 +0000
commitb66252112d45fd24eab85122fa8902afd1324542 (patch)
treed8a1c4b41a273e1b2450a203b54f7528d87c2f69
parentc38752d535eefee3d5cd2399514bf405e9dd3827 (diff)
parent9ac5602c1f5829c994360674fea1055a738caa23 (diff)
Merge "Fix crash in VirtualMachine.AllThreads JDWP command"
-rw-r--r--runtime/debugger.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index fa1a1a8b28..1cddb8bc9c 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -2095,6 +2095,11 @@ void Dbg::GetThreads(JDWP::ObjectId thread_group_id, std::vector<JDWP::ObjectId>
// query all threads, so it's easier if we just don't tell them about this thread.
return;
}
+ if (t->IsStillStarting()) {
+ // This thread is being started (and has been registered in the thread list). However, it is
+ // not completely started yet so we must ignore it.
+ return;
+ }
mirror::Object* peer = t->GetPeer();
if (IsInDesiredThreadGroup(peer)) {
thread_ids_.push_back(gRegistry->Add(peer));