8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations"

Reviewed-by: alanb
This commit is contained in:
Andrew Haley 2023-06-16 12:21:11 +00:00
parent b412fc79c3
commit 44a8aa0691
7 changed files with 82 additions and 70 deletions

View file

@ -433,7 +433,8 @@ class ThreadBuilders {
// run is specified to do nothing when Thread is a virtual thread
if (Thread.currentThread() == this && !runInvoked) {
runInvoked = true;
task.run();
Object bindings = Thread.scopedValueBindings();
runWith(bindings, task);
}
}