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

Fix use-after-move in buildMultiPlan

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • Query 2020-08-24

      This code can result in a nullptr dereference, depending on the order that the parameters to buildExecutableTree are evaluated.

      buildExecutableTree(*solutions[ix], true), std::move(solutions[ix])
      

      https://github.com/mongodb/mongo/blob/e908bb6b444235cb251c4e69b5adac9e6a983953/src/mongo/db/query/get_executor.cpp#L945

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: