JDK-8202171 : Some oopDesc functions compare this with NULL
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 10,11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-04-24
  • Updated: 2020-09-08
  • Resolved: 2018-07-31
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 12
12 b06Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The following functions contain expressions of the form (this == NULL) or (this != NULL)

oopDesc::print_on
oopDesc::print_value_on
oopDesc::verify_on

The compiler is free to elide those tests, since (this == NULL) can never be true; applying an ordinary member function to NULL invokes undefined behavior. These functions should be changed to be static member functions with an oop argument, with the test being applied to that argument.