mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations"
Reviewed-by: alanb
This commit is contained in:
parent
b412fc79c3
commit
44a8aa0691
7 changed files with 82 additions and 70 deletions
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
package java.lang;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.Locale;
|
||||
|
@ -54,7 +53,6 @@ import jdk.internal.vm.StackableScope;
|
|||
import jdk.internal.vm.ThreadContainer;
|
||||
import jdk.internal.vm.ThreadContainers;
|
||||
import jdk.internal.vm.annotation.ChangesCurrentThread;
|
||||
import jdk.internal.vm.annotation.ForceInline;
|
||||
import jdk.internal.vm.annotation.Hidden;
|
||||
import jdk.internal.vm.annotation.IntrinsicCandidate;
|
||||
import jdk.internal.vm.annotation.JvmtiMountTransition;
|
||||
|
@ -306,7 +304,7 @@ final class VirtualThread extends BaseVirtualThread {
|
|||
event.commit();
|
||||
}
|
||||
|
||||
Object bindings = scopedValueBindings();
|
||||
Object bindings = Thread.scopedValueBindings();
|
||||
try {
|
||||
runWith(bindings, task);
|
||||
} catch (Throwable exc) {
|
||||
|
@ -334,14 +332,6 @@ final class VirtualThread extends BaseVirtualThread {
|
|||
}
|
||||
}
|
||||
|
||||
@Hidden
|
||||
@ForceInline
|
||||
private void runWith(Object bindings, Runnable op) {
|
||||
ensureMaterializedForStackWalk(bindings);
|
||||
op.run();
|
||||
Reference.reachabilityFence(bindings);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mounts this virtual thread onto the current platform thread. On
|
||||
* return, the current thread is the virtual thread.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue