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

[AOT] java/lang/String/Split.java fails with AOTed java.base

XMLWordPrintable

    • b28

        java/lang/String/Split.java fails when running with AOTed java.base module.
        The test passes if java.base module is not AOTed.

        The failure is:
        ----------System.err:(12/696)----------
        java.lang.RuntimeException: String.split failure 12
        at Split.main(Split.java:127)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:246)
        at java.base/java.lang.Thread.run(Thread.java:835)

        where ine 127 is from following code:
           123 for (String src: srcStrs) {
           124 for (int limit=-2; limit<3; limit++) {
           125 if (!Arrays.equals(src.split(regex, limit),
           126 p.split(src, limit)))
           127 throw new RuntimeException("String.split failure 12");
           128 }
           129 }


        Steps to reproduce:
        > make run-test TEST="open/test/jdk/java/lang/String/Split.java" TEST_OPTS_AOT_MODULES="java.base" TEST_VM_OPTS="-server -ea -esa"

        Note, the failure is not 100% reproduced, but I am able to reproduce it every second time.

              dnsimon Douglas Simon
              epavlova Ekaterina Pavlova
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: