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

Some oopDesc functions compare this with NULL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10, 11
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      generic
    • OS:
      generic

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hseigel Harold Seigel
                Reporter:
                kbarrett Kim Barrett
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: