[SERVER-62877] Coverity analysis defect 121363: Uninitialized pointer field Created: 21/Jan/22  Updated: 29/Oct/23  Resolved: 15/Feb/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Daniel Gomez Ferro
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-01-21 at 3.39.13 PM.png    
Issue Links:
Duplicate
is duplicated by SERVER-62878 Coverity analysis defect 121363: Unin... Closed
is duplicated by SERVER-62894 Coverity analysis defect 121365: Unin... Closed
Problem/Incident
is caused by SERVER-61260 Support collations on clustered colle... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-02-21
Participants:

 Description   

Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption. A pointer field is not initialized in the constructor
/src/mongo/db/query/query_planner_params.h:149: UNINIT_CTOR 121363 Class member declaration for "clusteredCollectionCollator".
/src/mongo/db/query/query_planner_params.h:46: UNINIT_CTOR 121363 Non-static class member "clusteredCollectionCollator" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 15/Feb/22 ]

Author:

{'name': 'Daniel Gómez Ferro', 'email': 'daniel.gomezferro@mongodb.com', 'username': 'dgomezferro'}

Message: SERVER-62877 Initialize clusteredCollectionCollator
Branch: master
https://github.com/mongodb/mongo/commit/e99d7c8b9d71a1cca30166828392d614ac2905a7

Comment by Kyle Suarez [ 21/Jan/22 ]

SERVER-61260 added the clusteredCollectionCollator field to QueryPlannerParams but it looks like it's not given an initializer at declaration nor in the constructor.

Generated at Thu Feb 08 05:56:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.