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

Fix use after move in sharding_util::processShardResponses

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0, 6.0.5
    • Affects Version/s: 5.3.0-rc4, 6.0.3, 6.1.0-rc4, 6.2.0-rc6
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.2, v6.0
    • Sharding EMEA 2023-01-23

      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.

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

              Created:
              Updated:
              Resolved: