Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15281

UnorderedFastKeyTable methods size() and empty() incorrect if elements erased

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.7
    • Component/s: Internal Code
    • Labels:
      None
    • Operating System:
      ALL

      Description

      UnorderedFastKeyTable<>::erase() does not update member variable _size. As a result, a successful call to erase() will leave the map in a corrupt state: any subsequent calls to size() will include erased members in the returned count, and any subsequent calls to empty() will never return true.

      Callers of size() or empty() on instantiations of StringMap or BSONElementMap are potentially affected.

        Attachments

          Activity

            People

            Assignee:
            rassi J Rassi
            Reporter:
            rassi J Rassi
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: