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

JCK-111a StreamTokenizer tests are failing when JITed on x86.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.1.1
    • vm-legacy
    • jit
    • x86
    • solaris_2.5.1




      allan.jacobs@Eng 1997-04-11

      The JCK-111a tests StreamTokenizer0010, StreamTokenizer0020, and
      StreamTokenizer0030 (in api/java_io/StreamTokenizer) get an ArithmeticException (divide by zero) when JITed. They pass when the JIT
      is disabled.

      Modify and use the script:
      #!/bin/ksh
      JDKHOME=/set/jit/jit2/javavm11-gate/buildbin
      HOST=`/bin/hostname`
      echo ${HOST}
      export PATH=${JDKHOME}/bin:/usr/xpg4/bin:/bin:.
      echo ${HOST}'% export PATH='${PATH}
      export THREADS_FLAG=green
      echo ${HOST}'% export THREADS_FLAG='${THREADS_FLAG}
      JCK111=/net/mulder/export/mulder3/JCK-111a
      export CLASSPATH=${JCK111}/classes:${JDKHOME}/lib/classes.zip:.
      echo ${HOST}'% export CLASSPATH='${CLASSPATH}
      echo ${HOST}'% which java'
      which java
      echo ${HOST}'% java -version'
      java -version
      echo ${HOST}'% cp '${JCK111}'/tests/api/java_io/StreamTokenizer/EquivClass.html .'
      cp ${JCK111}/tests/api/java_io/StreamTokenizer/EquivClass.html .
      echo ${HOST}'% sed -e "s/^package/\/\/package/" '${JCK111}'/tests/api/java_io/StreamTokenizer/wordCharsTests.java > ./wordCharsTests.java'
      sed -e "s/^package/\/\/package/" ${JCK111}/tests/api/java_io/StreamTokenizer/wordCharsTests.java > ./wordCharsTests.java
      echo ${HOST}'% sed -e "s/^package/\/\/package/" '${JCK111}'/tests/api/java_io/StreamTokenizer/whitespaceCharsTests.java > ./whitespaceCharsTests.java'
      sed -e "s/^package/\/\/package/" ${JCK111}/tests/api/java_io/StreamTokenizer/whitespaceCharsTests.java > ./whitespaceCharsTests.java
      echo ${HOST}'% sed -e "s/^package/\/\/package/" '${JCK111}'/tests/api/java_io/StreamTokenizer/ordinaryCharsTests.java > ./ordinaryCharsTests.java'
      sed -e "s/^package/\/\/package/" ${JCK111}/tests/api/java_io/StreamTokenizer/ordinaryCharsTests.java > ./ordinaryCharsTests.java
      echo ${HOST}'% sed -e "s/^package/\/\/package/" '${JCK111}'/tests/api/java_io/StreamTokenizer/STate.java > ./STate.java'
      sed -e "s/^package/\/\/package/" ${JCK111}/tests/api/java_io/StreamTokenizer/STate.java > ./STate.java
      echo ${HOST}'% javac -d . -J-Djava.compiler=none wordCharsTests.java STate.java'
      javac -d . -J-Djava.compiler=none wordCharsTests.java STate.java
      echo ${HOST}'% javac -d . -J-Djava.compiler=none whitespaceCharsTests.java STate.java'
      javac -d . -J-Djava.compiler=none whitespaceCharsTests.java STate.java
      echo ${HOST}'% javac -d . -J-Djava.compiler=none ordinaryCharsTests.java STate.java'
      javac -d . -J-Djava.compiler=none ordinaryCharsTests.java STate.java
      echo ${HOST}'% java -Djava.compiler=none wordCharsTests -TestCaseID StreamTokenizer0010'
      java -Djava.compiler=none wordCharsTests -TestCaseID StreamTokenizer0010
      echo ${HOST}'% java -Djava.compiler=none ordinaryCharsTests -TestCaseID StreamTokenizer0020'
      java -Djava.compiler=none whitespaceCharsTests -TestCaseID StreamTokenizer0020
      echo ${HOST}'% java -Djava.compiler=none whitespaceCharsTests -TestCaseID StreamTokenizer0030'
      java -Djava.compiler=none ordinaryCharsTests -TestCaseID StreamTokenizer0030
      echo ${HOST}'% java -Djava.compiler=sunwjit wordCharsTests -TestCaseID StreamTokenizer0010'
      java -Djava.compiler=sunwjit wordCharsTests -TestCaseID StreamTokenizer0010
      echo ${HOST}'% java -Djava.compiler=sunwjit whitespaceCharsTests -TestCaseID StreamTokenizer0020'
      java -Djava.compiler=sunwjit whitespaceCharsTests -TestCaseID StreamTokenizer0020
      echo ${HOST}'% java -Djava.compiler=sunwjit ordinaryCharsTests -TestCaseID StreamTokenizer0030'
      java -Djava.compiler=sunwjit ordinaryCharsTests -TestCaseID StreamTokenizer0030



      On my machine, it generates the following output:
      x86-sirius
      x86-sirius% export PATH=/set/jit/jit2/javavm11-gate/buildbin/bin:/usr/xpg4/bin:/bin:.
      x86-sirius% export THREADS_FLAG=green
      x86-sirius% export CLASSPATH=/net/mulder/export/mulder3/JCK-111a/classes:/set/jit/jit2/javavm11-gate/buildbin/lib/classes.zip:.
      x86-sirius% which java
      /set/jit/jit2/javavm11-gate/buildbin/bin/java
      x86-sirius% java -version
      java version "tcm:03/21/21-20:00"
      x86-sirius% cp /net/mulder/export/mulder3/JCK-111a/tests/api/java_io/StreamTokenizer/EquivClass.html .
      x86-sirius% sed -e "s/^package/\/\/package/" /net/mulder/export/mulder3/JCK-111a/tests/api/java_io/StreamTokenizer/wordCharsTests.java > ./wordCharsTests.java
      x86-sirius% sed -e "s/^package/\/\/package/" /net/mulder/export/mulder3/JCK-111a/tests/api/java_io/StreamTokenizer/whitespaceCharsTests.java > ./whitespaceCharsTests.java
      x86-sirius% sed -e "s/^package/\/\/package/" /net/mulder/export/mulder3/JCK-111a/tests/api/java_io/StreamTokenizer/ordinaryCharsTests.java > ./ordinaryCharsTests.java
      x86-sirius% sed -e "s/^package/\/\/package/" /net/mulder/export/mulder3/JCK-111a/tests/api/java_io/StreamTokenizer/STate.java > ./STate.java
      x86-sirius% javac -d . -J-Djava.compiler=none wordCharsTests.java STate.java
      Note: STate.java uses a deprecated API. Recompile with "-deprecation" for details.
      1 warning
      x86-sirius% javac -d . -J-Djava.compiler=none whitespaceCharsTests.java STate.java
      Note: STate.java uses a deprecated API. Recompile with "-deprecation" for details.
      1 warning
      x86-sirius% javac -d . -J-Djava.compiler=none ordinaryCharsTests.java STate.java
      Note: STate.java uses a deprecated API. Recompile with "-deprecation" for details.
      1 warning
      x86-sirius% java -Djava.compiler=none wordCharsTests -TestCaseID StreamTokenizer0010
      STATUS:Passed. OKAY
      x86-sirius% java -Djava.compiler=none ordinaryCharsTests -TestCaseID StreamTokenizer0020
      STATUS:Passed. OKAY
      x86-sirius% java -Djava.compiler=none whitespaceCharsTests -TestCaseID StreamTokenizer0030
      STATUS:Passed. OKAY
      x86-sirius% java -Djava.compiler=sunwjit wordCharsTests -TestCaseID StreamTokenizer0010
      STATUS:Failed. Unexpected java.lang.ArithmeticException: / by zero thrown
      x86-sirius% java -Djava.compiler=sunwjit whitespaceCharsTests -TestCaseID StreamTokenizer0020
      STATUS:Failed. Unexpected java.lang.ArithmeticException: / by zero thrown
      x86-sirius% java -Djava.compiler=sunwjit ordinaryCharsTests -TestCaseID StreamTokenizer0030
      STATUS:Failed. Unexpected java.lang.ArithmeticException: / by zero thrown



      allan.jacobs@Eng 1997-04-18
      Also fails on Windows NT 4.0.

            tcramersunw Timothy Cramer (Inactive)
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: