JDK-8252916 : Newline in object field values list of ScopeDesc should be removed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 12,13,14,15,16
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-09-08
  • Updated: 2024-11-22
  • Resolved: 2020-09-09
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 16
16 b15Fixed
Related Reports
Relates :  
Description
public class Test {

    static class MyClass {
        Object o1 = null;
        Object o2 = new Integer(42);
    }

    static Object test(boolean trap) {
        MyClass obj = new MyClass();
        if (trap) { }
        return obj.o1;
    }

    public static void main(String[] args) {
        for (int i = 0; i < 100_000; ++i) {
            test(false);
        }
    }
}

The ScopeDesc for the uncommon trap in 'test' is printed like this:

ScopeDesc(pc=0x00007f52a5160144 offset=84):
   Test::test@9 (line 11)  reexecute=true
   Locals
    - l0: empty
    - l1: obj[52]
   Expression stack
    - @0: reg rbp [10],int
   Objects
    - 52: Test$MyClass NULL
, stack[0],oop

There should be no newline after "NULL".
Comments
Changeset: c655b703 Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2020-09-09 05:57:41 +0000 URL: https://git.openjdk.java.net/jdk/commit/c655b703
09-09-2020

Output with the fix: ScopeDesc(pc=0x00007ffa551600c4 offset=84): Test::test@9 (line 11) reexecute=true Locals - l0: empty - l1: obj[52] Expression stack - @0: reg rbp [10],int Objects - 52: Test$MyClass NULL, stack[0],oop
08-09-2020

ILW = Debug output contains unexpected newline, with PrintAssembly, no workaround = LLH = P5
08-09-2020

This is a regression from JDK-8202171 in JDK 12: http://hg.openjdk.java.net/jdk/jdk/rev/4ac20e5f96ce#l3.11
08-09-2020