Some oopDesc functions compare this with NULL

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 12
    • Affects Version/s: 10, 11
    • Component/s: hotspot
    • b06
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: