[SERVER-69280] Coverity analysis defect 123375: Using a moved object Created: 31/Aug/22  Updated: 29/Oct/23  Resolved: 22/Sep/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-08-31 at 10.38.23 AM.png    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-10-03
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/exec/index_scan.cpp:73: USE_AFTER_MOVE 123375 "params.bounds" is moved (indicated by "std::move(params.bounds)").
/src/mongo/db/exec/index_scan.cpp:79: USE_AFTER_MOVE 123375 "params.bounds" is used after it has been already moved.



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

Author:

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

Message: SERVER-69280 Fixed use-after-move defect in IndexScan
Branch: master
https://github.com/mongodb/mongo/commit/7b52219b95967bce103e85f7a26bfaf70f5146c6

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