JDK-8323803 : ConstantOopReadValue::print_on should print 'null' instead of 'nullptr'
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21,22,23
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-01-16
  • Updated: 2024-11-19
  • Resolved: 2024-11-07
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 24
24 b24Fixed
Related Reports
Relates :  
Description
When debugging, I noticed that ConstantOopReadValue::print_on prints 'nullptr' instead of 'NULL' for a field value:

ScopeDesc(pc=0x00002e13849f2a10 offset=970):
   Test::racyStringConstructionCodepointsSurrogates@110 (line 60) reexecute=true
   Locals
    - l0: empty
    - l1: empty
    - l2: empty
    - l3: stack[24],oop
    - l4: empty
    - l5: merge_obj[708]
    - l6: empty
   Expression stack
    - @0: reg rbp [10],int
    - @1: 1000000
   Objects
    - 0: R merge_obj[708], selector="stack[8]", candidate_objs=[709, 710]
    - 1: obj[709], java.lang.String
        Fields: 0, 0, 0, stack[40],oop
    - 2: obj[710], java.lang.String
        Fields: 0, 0, 0, nullptr

This is a regression from JDK-8300242. We should also check related code.
Comments
Changeset: 7620b129 Branch: master Author: Theo Weidmann <theo.weidmann@oracle.com> Committer: Tobias Hartmann <thartmann@openjdk.org> Date: 2024-11-07 10:04:03 +0000 URL: https://git.openjdk.org/jdk/commit/7620b129888d57514d9ef588e0681f1d43377236
07-11-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21869 Date: 2024-11-04 09:23:16 +0000
05-11-2024

Assigning this to me to reserve for a new hire in the compiler team.
23-10-2024

ILW = Misleading debug output, null fields in debug info printing, no workaround = LLH = P5
16-01-2024