[SERVER-70230] Coverity analysis defect 122718: Using a moved object Created: 05/Oct/22  Updated: 29/Oct/23  Resolved: 14/Oct/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Sebastien Mendez
Resolution: Fixed Votes: 0
Labels: coverity, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-10-05 at 10.11.51 AM.png    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-10-17
Participants:

 Description   

Using a moved object

Using a moved object may lead to an unexpected/undefined behavior. An object is used after it's moved.
/src/mongo/s/query/async_results_merger.cpp:111: USE_AFTER_MOVE 122718 "params" is moved (indicated by "std::move(params)").
/src/mongo/s/query/async_results_merger.cpp:115: USE_AFTER_MOVE 122718 "params" is used after it has been already moved.



 Comments   
Comment by Githook User [ 14/Oct/22 ]

Author:

{'name': 'Sebastien Mendez', 'email': 'sebastien.mendez@mongodb.com', 'username': 'rakiz'}

Message: SERVER-70230 Fixed use-after-move defect in AsyncResultsMerger
Branch: master
https://github.com/mongodb/mongo/commit/95180bdfb528456a3a6b19ab185282f57cc3c926

Generated at Thu Feb 08 06:15:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.