[SERVER-69279] Coverity analysis defect 128706: Uninitialized scalar field Created: 31/Aug/22  Updated: 27/Oct/23  Resolved: 12/Jan/23

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

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Milena Ivanova
Resolution: Gone away 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-31 at 10.34.05 AM.png    
Assigned Teams:
Query Optimization
Operating System: ALL
Participants:

 Description   

Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations. A scalar field is not initialized by the constructor
/src/mongo/db/query/optimizer/cascades/memo.h:261: UNINIT_CTOR 128706 Class member declaration for "_heuristicCE".
/src/mongo/db/query/optimizer/opt_phase_manager.cpp:62: UNINIT_CTOR 128706 Non-static class member "_memo._heuristicCE" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Milena Ivanova [ 12/Jan/23 ]

The code where the error occurred is outdated. The current version of OptPhaseManager has two cardinality estimators which are initialized and uassert-ed in the constructor.

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