Commit 9ac5602c authored by Sebastien Hertz's avatar Sebastien Hertz
Browse files

Fix crash in VirtualMachine.AllThreads JDWP command

When collecting all the started threads, we may encounter a thread in the
process of being started from Java code (Thread.start) in the threads list. The
crash occurs when we attempt to access the java.lang.Thread peer (calling
Thread::GetPeer) but the JNI global reference to it (Thread::jpeer) has not
been destroyed yet (which is verified with a check). This only happens when the
thread is starting up.

We now check the thread finished starting up before accessing the Java peer.
This also prevents from returning non-started threads in the reply.

Bug: 16660101

(cherry picked from commit a22d1157)

Change-Id: Ib61dbd0b01f63bfdda708d3c93eac58284bbe236
parent 6c6c6f66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment