[SERVER-71996] Coverity analysis defect 134325: Using a moved object Created: 09/Dec/22  Updated: 29/Oct/23  Resolved: 06/Jan/23

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Davis Haupt (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity, greenerbuild
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
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/optimizer/node.cpp:836: USE_AFTER_MOVE 134325 "filter" is moved (indicated by "std::move(filter)").
/src/mongo/db/query/optimizer/node.cpp:846: USE_AFTER_MOVE 134325 "filter" is used after it has been already moved.



 Comments   
Comment by Githook User [ 06/Jan/23 ]

Author:

{'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}

Message: SERVER-71996 fix use-after-move in SpoolProducerNode constructor
Branch: master
https://github.com/mongodb/mongo/commit/e264b20b47195185ac21f5ca591fca9cc91b1540

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