JDK-8133195 : [JVMCI] CompilerToVM::getLocalVariableTableStart and CompilerToVM::getLocalVariableTableLength return 0
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: External
  • Submitted: 2015-08-07
  • Updated: 2015-09-22
  • Resolved: 2015-09-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Relates :  
Relates :  
Description
CompilerToVM::getLocalVariableTableStart and CompilerToVM::getLocalVariableTableStart return 0 on valid methods with local variables.
For example
    public int dummyInstanceFunction() {
        String str1 = "123123123";
        double x = 3.14;
        int y = Integer.parseInt(str1);

        return y / (int) x;
    }
javap
  public int dummyInstanceFunction();
    descriptor: ()I
    flags: ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=1
         0: ldc           #4                  // String 123123123
.......
Comments
it is not jvmci bug
22-09-2015

Can we close that bug or at least move it to another category?
22-09-2015

If I compile the class manually with -g the table does exist: public void dummyFunction(); descriptor: ()V flags: ACC_PUBLIC Code: stack=0, locals=1, args_size=1 0: return LineNumberTable: line 151: 0 LocalVariableTable: Start Length Slot Name Signature 0 1 0 this Lcompiler/jvmci/CompilerToVM/GetLocalVariableTableTest$DummyClass;
17-09-2015

I can see -g being passed to javac in the output but the resulting class file doesn't have the table.
17-09-2015

at least we ask jtreg to compile w/ -g.
17-09-2015

Oh, the one attached does have it. I've used the patch you sent me, Igor.
17-09-2015

I don't see that directive in the file I have.
17-09-2015

we do compile w/ -g: " * @compile -g GetLocalVariableTableTest.java"
17-09-2015

This is a test bug. You only get a LocalVariableTable if you compile with -g: LocalVariableTable: Start Length Slot Name Signature 0 19 0 this LTest; 3 16 1 str1 Ljava/lang/String; 7 12 2 x D 13 6 4 y I
17-09-2015

GetLocalVariableTableTest v.02 : I use ResolvedMethodGetter only to get HotSpotResolvedJavaMethodImpl; CompilerToVMHelper need to make getLocalVariableTableStart public
17-09-2015

[~tpivovarova], could you please rewrite the test so it works with the current JVMCI out for review?
14-09-2015