[SERVER-68998] Coverity analysis defect 123183: Using a moved object Created: 19/Aug/22  Updated: 29/Oct/23  Resolved: 02/Sep/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Gil Alon
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-08-19 at 11.21.32 AM.png    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QO 2022-09-05
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/db/query/multiple_collection_accessor.h:63: USE_AFTER_MOVE 123183 "secondaryNss" is moved (indicated by "std::move(secondaryNss)").
/src/mongo/db/query/multiple_collection_accessor.h:63: USE_AFTER_MOVE 123183 "secondaryNss" is used after it has been already moved.



 Comments   
Comment by Githook User [ 01/Sep/22 ]

Author:

{'name': 'galon1', 'email': 'gil.alon@mongodb.com', 'username': 'galon1'}

Message: SERVER-68998 Fix coverity warning using a moved object
Branch: master
https://github.com/mongodb/mongo/commit/c00d004b124056e3cae35410dfe24c726adbac08

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