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

Some oopDesc functions compare this with NULL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 12
    • 10, 11
    • hotspot
    • b06
    • generic
    • 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

              hseigel Harold Seigel (Inactive)
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: