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

symcjit (1.2.2) sets a reference variable to null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: vm-legacy
    • Labels:

      Description



      Name: skT88420 Date: 08/06/99


      C:\>javac Bug.java

      C:\>java -version
      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)

      C:\>java Bug
      on entry, array=[J@76ba9993
      on exit, array=null

      C:\>java -fullversion
      JAVA.EXE full version "JDK-1.2.2-W"


      ------------- source follows ---------------

      //
      // In bug(), 'array' gets set to null by JDK1.2.2 symcjit (ok with nojit).
      //
      // This is a stripped down version of the actual program;
      // the algorithm here is meaningless.
      //
      public final class Bug
      {
        private Bug() { }

        public static void main(String[] argv)
        {
          bug();
        }

        private static long bug()
        {
          final long[] array = new long[3];
          System.out.println("on entry, array="+array);

          long sum = 0L;

          for (int i=0; i<array.length; i+=3)
          {
            long v0 = array[i];
            long v1 = array[i+1];
            long v2 = array[i+2];

            v0 += v2;
            v1 += v2;

            sum = v0 + v1;
          }

          System.out.println("on exit, array="+array);

          return sum;
        }
      }
      (Review ID: 93600)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              skonchad Sandeep Konchady
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: