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

[JMH] test foreign.StrLenTest failed with StringIndexOutOfBoundsException for size=451

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • None

      The test org.openjdk.bench.java.lang.foreign.StrLenTest reports
      "java.lang.StringIndexOutOfBoundsException" for size 450+.
      The failure message is:
      java.lang.StringIndexOutOfBoundsException: Range [0, 451) out of bounds for length 450
      Command to run:
      java -jar benchmarks.jar -f 1 -wi 1 -i 1 -t 1 -p size=451 -jvmArgs "-Djava.library.path=native" StrLenTest

      During initialization it use sub-strig of 450 symbols string without any checks.
      The test should check parameters or generate string with requested size.

            vaivanov Vladimir Ivanov
            vaivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: