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

No LocalVariableTable generated for the entire JDK

XMLWordPrintable

    • x86_64
    • linux

      FULL PRODUCT VERSION :
      openjdk version "1.8.0_51"
      OpenJDK Runtime Environment (build 1.8.0_51-b16)
      OpenJDK 64-Bit Server VM (build 25.51-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux 4.1.4-1-ARCH #1 SMP PREEMPT Mon Aug 3 21:30:37 UTC 2015 x86_64 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      The JDK8 doesn't contain enough debug information, the LocalVariableTables are not generated. This means that the Eclipse debugger can't show any variable names. As an example, this is the bytecdoe of java.util.ArrayList#subList:

        public java.util.List<E> subList(int, int);
          descriptor: (II)Ljava/util/List;
          flags: ACC_PUBLIC
          Code:
            stack=7, locals=3, args_size=3
               0: iload_1
               1: iload_2
               2: aload_0
               3: getfield #1 // Field size:I
               6: invokestatic #63 // Method subListRangeCheck:(III)V
               9: new #64 // class java/util/ArrayList$SubList
              12: dup
              13: aload_0
              14: aload_0
              15: iconst_0
              16: iload_1
              17: iload_2
              18: invokespecial #65 // Method java/util/ArrayList$SubList."<init>":(Ljava/util/ArrayList;Ljava/util/AbstractList;III)V
              21: areturn
            LineNumberTable:
              line 996: 0
              line 997: 9
          Signature: #188 // (II)Ljava/util/List<TE;>;

      In JDK7 the information is present. Here the bytecode looks like this:

        public java.util.List<E> subList(int, int);
          flags: ACC_PUBLIC
          Code:
            stack=7, locals=3, args_size=3
               0: iload_1
               1: iload_2
               2: aload_0
               3: getfield #2 // Field size:I
               6: invokestatic #60 // Method subListRangeCheck:(III)V
               9: new #61 // class java/util/ArrayList$SubList
              12: dup
              13: aload_0
              14: aload_0
              15: iconst_0
              16: iload_1
              17: iload_2
              18: invokespecial #62 // Method java/util/ArrayList$SubList."<init>":(Ljava/util/ArrayList;Ljava/util/AbstractList;III)V
              21: areturn
            LineNumberTable:
              line 954: 0
              line 955: 9
            LocalVariableTable:
              Start Length Slot Name Signature
                     0 22 0 this Ljava/util/ArrayList;
                     0 22 1 fromIndex I
                     0 22 2 toIndex I
            LocalVariableTypeTable:
              Start Length Slot Name Signature
                  0 22 0 this Ljava/util/ArrayList<TE;>;
          Signature: #214 // (II)Ljava/util/List<TE;>;

      REGRESSION. Last worked in version 7u80

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.7.0_85"
      OpenJDK Runtime Environment (IcedTea 2.6.1) (Arch Linux build 7.u85_2.6.1-1-x86_64)
      OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run:

      $ javap -v -c -s java.util.ArrayList


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      LocalVariableTable and LocalVariableTypeTable should be shown.

      ACTUAL -
      LocalVariableTable and LocalVariableTypeTable are not shown.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      java.util.ArrayList
      ---------- END SOURCE ----------

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: