Make markWord::has_monitor() more robust

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 19
    • Component/s: hotspot
    • None
    • b19
    • generic
    • generic

      Currently, markWord::has_monitor() is implemented like this:

          return ((value() & monitor_value) != 0);

      monitor value is 0b10. This means that it also reports marked or forwarded objects (0b11) as having a monitor, which is wrong. As far as I can tell, it does not cause any problems because relevant code is either not affected by marked/forwarded objects, or by testing bits in an order that hides the problem.

            Assignee:
            Roman Kennke
            Reporter:
            Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: