JDK-8160965 : Test compiler/stringopts/TestStringObjectInitialization.java fails when explicitly executed with GC other than Parallel
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u111
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2016-07-07
  • Updated: 2016-07-07
  • Resolved: 2016-07-07
Related Reports
Duplicate :  
Description
Accordingly to jtreg's annotations in the test it should be run with ParallelGC only. Any attempts to run with other GC causes the following failure:

Conflicting collector combinations in option list; please refer to the release notes for the combinations allowed
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

The suggested fix is:

@@ -30,6 +30,7 @@
  * @summary Verifies that no partially initialized String object escapes from
  *          C2's String concat optimization in a highly concurrent setting.
  *          This test triggers the bug in about 1 out of 10 runs.
+ * @requires vm.gc == "null" | vm.gc == "Parallel"
  * @compile -XDstringConcat=inline TestStringObjectInitialization.java
  * @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-CompactStrings
  *                               -XX:-UseG1GC -XX:+UseParallelGC TestStringObjectInitialization

It should prevent the test from being run under inappropriate GC.


Comments
This is a duplicate of JDK-8160122 which was fixed in 8u112. Closing.
07-07-2016