[SERVER-68989] Coverity analysis defect 122802: Missing assignment operator Created: 19/Aug/22  Updated: 08/Mar/23  Resolved: 08/Mar/23

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: Amr Elhelw
Resolution: Won't Fix Votes: 0
Labels: coverity, neweng, quick-tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-08-19 at 10.57.02 AM.png    
Assigned Teams:
Query Optimization
Operating System: ALL
Sprint: QE 2023-02-20, QE 2023-03-06, QE 2023-03-20
Participants:

 Description   

Missing assignment operator

This class, which frees resources in its destructor, does not have a user-written copy assignment operator, but is copy-assigned. Unless the resource is managed separately from the copy operation, this may cause use-after-free errors. Class that owns resources lacks a user-written assignment operator
/src/mongo/db/query/optimizer/algebra/polyvalue.h:220: MISSING_COPY_OR_ASSIGN 122802 Class "mongo::optimizer::algebra::PolyValue<mongo::optimizer::BoolExpr<mongo::optimizer::IntervalRequirement>::Atom, mongo::optimizer::BoolExpr<mongo::optimizer::IntervalRequirement>::Conjunction, mongo::optimizer::BoolExpr<mongo::optimizer::IntervalRequirement>::Disjunction>" owns resources that are freed in its destructor but has no user-written assignment operator.


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