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

FieldRef::parse does not completely initialize the FieldRef

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.5, 3.7.4
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Sprint:
      Query 2018-04-09
    • Linked BF Score:
      91

      Description

      There are two problems:

      1) FieldRef::parse() is completely responsible for initializing a newly constructed FieldRef when using the FieldRef(StringData) constructor. Right now, it's not initializing _cachedSize, resulting in undefined behavior, including test cases that fail on some platforms but not others.

      2) When calling parse() on an existing FieldRef, not all of its internals get reset. In particular, parsing the empty string puts the FieldRef in an inconsistent state.

        Attachments

          Activity

            People

            Assignee:
            justin.seyster Justin Seyster
            Reporter:
            justin.seyster Justin Seyster
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: