Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160965

Test compiler/stringopts/TestStringObjectInitialization.java fails when explicitly executed with GC other than Parallel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u111
    • hotspot
    • None
    • generic
    • generic

      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.

            thartmann Tobias Hartmann
            dkononenko Denis Kononenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: