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

C2: java.lang.StringUTF16::indexOfChar intrinsic called with negative character argument

XMLWordPrintable

    • b11

        Please excuse for a messy fuzzing test.

        The test code is attached, along with escaped UTF-8 sample outputs.
        The interpreted code was executed like this:

        ${JAVA_HOME}/bin/java -XX:-PrintWarnings -Xint -Dstdout.encoding=UTF-8 Test_245

        ...while for compiled I used the following:

        ${JAVA_HOME}/bin/java -XX:-PrintWarnings -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:StressSeed=2110910222 -XX:+StressIGVN -XX:+StressCCP -XX:+StressGCM -XX:+StressLCM -XX:-TieredCompilation -Xbatch -Dstdout.encoding=UTF-8 Test_245

        The bug was reproduced against the OpenJDK version from 2023-01-29, with the following git HEAD:
        6475501a012

          1. Reduced.java
            0.4 kB
          2. Test_245.java
            52 kB
          3. Test_245.xcomp.out
            855 kB
          4. Test_245.xint.out
            855 kB

              dfenacci Damon Fenacci
              enikitin Evgeny Nikitin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: