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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.7.7
    • Internal Code
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: