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

Fix use after move in sharding_util::processShardResponses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.3.0-rc4, 6.0.3, 6.1.0-rc4, 6.2.0-rc6
    • 6.3.0-rc0, 6.0.5
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.2, v6.0
    • Sharding EMEA 2023-01-23

    Description

      In sharding_util::processShardResponses we std::move part of the response and then we std::move again the entire response object.

      This is not causing invalid memory access because the RemoteCommandResponse class doesn't have a move constructor, thus the first std::move is actually making a copy of the object.

      Attachments

        Issue Links

          Activity

            People

              tommaso.tocci@mongodb.com Tommaso Tocci
              tommaso.tocci@mongodb.com Tommaso Tocci
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: