[SERVER-71701] Coverity analysis defect 134242: Using a moved object Created: 30/Nov/22  Updated: 09/Dec/22  Resolved: 09/Dec/22

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

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

Issue Links:
Duplicate
duplicates SERVER-71310 Validate histograms Closed
Assigned Teams:
Query Optimization
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/stats/scalar_histogram.cpp:97: USE_AFTER_MOVE 134242 "bounds" is moved (indicated by "std::move(bounds)").
/src/mongo/db/query/stats/scalar_histogram.cpp:98: USE_AFTER_MOVE 134242 "bounds" is used after it has been already moved.



 Comments   
Comment by Davis Haupt (Inactive) [ 09/Dec/22 ]

This use-after-move was fixed by SERVER-71310

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