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

ZGC: Incorrect type signature in ZMappedCache comparator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • gc

      The type signature for 'int ZMappedCache::EntryCompare::cmp(const IntrusiveRBNode* a, const IntrusiveRBNode* b)' is incorrect. As described in rbTree.hpp, the cmp function used for tree validation should return a bool (true if a < b, false otherwise).

      The incorrect signature prevents IntrusiveRBTree from using cmp as intended during validation, resulting in the fallback verify function being used, which always returns valid node comparisons. This could mask potential issues in the tree structure.

            jsikstro Joel Sikström
            cnorrbin Casper Norrbin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: