[SERVER-71620] Coverity analysis defect 134237: Using a moved object Created: 25/Nov/22  Updated: 29/Oct/23  Resolved: 13/Dec/22

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: Allison Easton
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-70382 Replace boost::none index versions wi... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-12-12
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/collection_routing_info_targeter.cpp:628: USE_AFTER_MOVE 134237 "shardId" is moved (indicated by "std::move(shardId)").
/src/mongo/s/collection_routing_info_targeter.cpp:628: USE_AFTER_MOVE 134237 "shardId" is used after it has been already moved.



 Comments   
Comment by Githook User [ 13/Dec/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-71620 Coverity analysis defect 134237: Using a moved object
Branch: master
https://github.com/mongodb/mongo/commit/9318ca21ba0b6efdab119219d8021e3bc8e4b5a0

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