File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/jdk.jdwp.agent/share/native/libjdwp Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -253,8 +253,15 @@ findThread(ThreadList *list, jthread thread)
253253 if ( list == NULL || list == & otherThreads ) {
254254 node = nonTlsSearch (getEnv (), & otherThreads , thread );
255255 }
256- /* A thread with no TLS should never be in the runningThreads list. */
257- JDI_ASSERT (!nonTlsSearch (getEnv (), & runningThreads , thread ));
256+ /*
257+ * Search runningThreads list. The TLS lookup may have failed because the
258+ * thread has terminated, but the ThreadNode may still be present.
259+ */
260+ if ( node == NULL ) {
261+ if ( list == NULL || list == & runningThreads ) {
262+ node = nonTlsSearch (getEnv (), & runningThreads , thread );
263+ }
264+ }
258265 }
259266
260267 /* If a list is supplied, only return ones in this list */
You can’t perform that action at this time.
0 commit comments