Skip to content

Commit 9fd4b01

Browse files
committedMar 10, 2021
Fix issue with not unregistering vthreads when they have exited. They were still appearing in the list of threads given to debuggers.
1 parent 279298c commit 9fd4b01

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,11 @@ threadControl_onEventHandlerExit(EventIndex ei, jthread thread,
23032303
env = getEnv();
23042304
if (ei == EI_THREAD_END) {
23052305
jboolean inResume = (node->resumeFrameDepth > 0);
2306-
removeThread(env, &runningThreads, thread);
2306+
if (isVThread(thread)) {
2307+
removeThread(env, &runningVThreads, thread);
2308+
} else {
2309+
removeThread(env, &runningThreads, thread);
2310+
}
23072311
node = NULL; /* has been freed */
23082312

23092313
/*

0 commit comments

Comments
 (0)
Please sign in to comment.