# HG changeset patch # User bulasevich # Date 1526993695 -7200 # Node ID c4800cdd45c75d9a12f890147f7b4aeb729d2e61 # Parent 5afedc9e4662a32490264202054cbbe35ec25d96 8203431: TestFloatsOnStackDeopt.java throws java.lang.LinkageError: loader attempted duplicate class definition for java.lang.invoke.BoundMethodHandle$Species_LLL Reviewed-by: redestad diff -r 5afedc9e4662 -r c4800cdd45c7 test/hotspot/jtreg/ProblemList.txt --- a/test/hotspot/jtreg/ProblemList.txt Tue May 22 14:44:18 2018 +0200 +++ b/test/hotspot/jtreg/ProblemList.txt Tue May 22 14:54:55 2018 +0200 @@ -46,7 +46,6 @@ compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8140405 generic-all compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java 8158860 generic-all compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java 8163894 generic-all -compiler/runtime/TestFloatsOnStackDeopt.java 8203431 generic-all compiler/tiered/LevelTransitionTest.java 8067651 generic-all compiler/types/correctness/CorrectnessTest.java 8066173 generic-all compiler/types/correctness/OffTest.java 8066173 generic-all diff -r 5afedc9e4662 -r c4800cdd45c7 test/hotspot/jtreg/compiler/runtime/TestFloatsOnStackDeopt.java --- a/test/hotspot/jtreg/compiler/runtime/TestFloatsOnStackDeopt.java Tue May 22 14:44:18 2018 +0200 +++ b/test/hotspot/jtreg/compiler/runtime/TestFloatsOnStackDeopt.java Tue May 22 14:54:55 2018 +0200 @@ -39,6 +39,7 @@ private static final int ITERS2 = 40000; private static final float VALUE = 15.f; public static String dummyString = "long long string"; + static volatile boolean pleaseStop = false; static void run_loop_with_safepoint(float[] a0, float b) { // Non-counted loop with safepoint. @@ -54,9 +55,9 @@ // thread provokes frequent GC - together with +DeoptimizeALot and safepoint it forces executed function deoptimization Thread th = new Thread() { public void run() { - while(true) { + while (!pleaseStop) { synchronized(this) { try { wait(1); } catch (Exception ex) {} } - dummyString += dummyString; + dummyString = new StringBuilder(dummyString).append(dummyString).toString(); if (dummyString.length() > 1024*1024) { dummyString = "long long string"; } } } @@ -77,7 +78,12 @@ if (errn > 0) break; } - th.stop(); + pleaseStop = true; + try { + th.join(); + } catch (InterruptedException e) { + throw new Error("InterruptedException in main thread ", e); + } return errn; }