Fix use after move in sharding_util::processShardResponses

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Tommaso Tocci
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: