mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8268285: vmTestbase/nsk/jvmti/GetThreadState/thrstat002 failed with "Wrong thread "thr1" (...) state after SuspendThread"
Reviewed-by: lmesnik, amenkov, dholmes
This commit is contained in:
parent
ece3ae3cc4
commit
dd1cbadc82
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -158,8 +158,11 @@ class thrstat002a extends Thread {
|
||||
}
|
||||
System.out.println("thrstat002a.run after blockingMonitor lock");
|
||||
|
||||
System.out.println("thrstat002a.run before runningBarrier unlock");
|
||||
thrstat002.runningBarrier.unlock();
|
||||
System.out.println("thrstat002a.run after runningBarrier unlock");
|
||||
|
||||
// Don't do println's from this point until we have exited the loop,
|
||||
// else we can suspend in the println in an unexpected state.
|
||||
int i = 0;
|
||||
int n = 1000;
|
||||
while (flag) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -355,6 +355,7 @@ Java_nsk_jvmti_GetThreadState_thrstat002_checkStatus(JNIEnv *env, jclass cls,
|
||||
result = STATUS_FAILED;
|
||||
}
|
||||
}
|
||||
fflush(0);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user