File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
test/hotspot/jtreg/vmTestbase/nsk/jvmti/StopThread Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2004, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2004, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2828import nsk .share .*;
2929import nsk .share .jvmti .*;
3030
31+ import java .util .concurrent .locks .LockSupport ;
32+
3133public class stopthrd007 extends DebugeeClass {
3234
3335 // run test from command line
@@ -66,6 +68,11 @@ public int runIt(String argv[], PrintStream out) {
6668 log = new Log (out , argHandler );
6769 timeout = argHandler .getWaitTime () * 60 * 1000 ;
6870
71+ // Unpark virtual threads to load jdk.internal.misc.VirtualThreads
72+ // and avoid NoClassDefFoundError if ThreadDeath is happen during unlock.
73+ Thread vt = Thread .startVirtualThread (LockSupport ::park );
74+ LockSupport .unpark (vt );
75+
6976 log .display ("Debugee started" );
7077
7178 startingBarrier = new Wicket (3 );
You can’t perform that action at this time.
0 commit comments