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

2.0: Bogus exception with modified version of String

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.1
    • 1.0
    • hotspot
    • None
    • beta
    • generic
    • windows_nt

      I've modified the String class to unroll the compareTo and equals methods.
      The resulting modifications cause a spec program (_209_db) to fail with
      a null pointer exception and a trace that looks bogus. I can see no error
      in my changes, and classic does not have this problem.

      Note that this version of string has also been modified to store the
      hash code along with string.
      The bug is seen both with HotSpot 1.0 E and with HotSpot 1.0.1 as of June
      9.

      Exception trace:
      Benchmark _209_db in d:/bgomes/Results/string-uploopunroll4-third.run
      Exception in thread "main" java.lang.NullPointerException
              at SpecApplicationRunner.benchmarkDone(SpecApplication.java:281)
              at spec.harness.ProgramRunner.runBenchmark(ProgramRunner.java:244)
              at spec.harness.ProgramRunner.run(ProgramRunner.java:206)
              at spec.harness.RunProgram.run(RunProgram.java:60)
              at SpecApplication.runBenchmark(SpecApplication.java:255)
              at SpecApplication.main(SpecApplication.java:171)

      Note that this stack trace seems to be bogus - line 281 in SpecApplication.java
      has no code. However, there could be some difference between the class files
      and the Java files shipped by spec.


      The invoking command line, run in the spec directory is
      ...java -Xbootclasspath/p:d:/altjdk -ms32m -mx32m -Xint SpecApplication -m3 -M3 -a _209_db

      The directory d:/altjdk should have the following directory structure
      java/lang/String.class.

      I've attached my modified version of String.java and the resulting class file.


            rschmidtsunw Rene Schmidt (Inactive)
            bgomessunw Benedict Gomes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: