[SERVER-70233] Coverity analysis defect 123039: Using a moved object Created: 05/Oct/22  Updated: 29/Oct/23  Resolved: 11/Oct/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Ali Mir
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.23.32 AM.png    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 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/db/modules/enterprise/src/hot_backups/document_source_backup_file.cpp:145: USE_AFTER_MOVE 123039 "spec" is moved (indicated by "std::move(spec)").
/src/mongo/db/modules/enterprise/src/hot_backups/document_source_backup_file.cpp:146: USE_AFTER_MOVE 123039 "spec" is used after it has been already moved.



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

Author:

{'name': 'ali-mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}

Message: SERVER-70233 Fix use-after-move defect in DocumentSourceBackupFile
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/0183619f90d1b510650596835952972602c1fb8e

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