[SERVER-67546] Coverity analysis defect 122386: Uninitialized pointer field Created: 27/Jun/22  Updated: 29/Oct/23  Resolved: 27/Jul/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Kyle Suarez
Resolution: Fixed Votes: 0
Labels: coverity, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-06-27 at 12.52.49 PM.png    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-07-25, QE 2022-08-08
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/exec/sbe/stages/hash_lookup.h:184: UNINIT_CTOR 122386 Class member declaration for "_collator".
/src/mongo/db/exec/sbe/stages/hash_lookup.cpp:61: UNINIT_CTOR 122386 Non-static class member "_collator" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 27/Jul/22 ]

Author:

{'name': 'Kyle Suarez', 'email': 'kyle.suarez@mongodb.com', 'username': 'ksuarz'}

Message: SERVER-67546 initialize _collator to nullptr
Branch: master
https://github.com/mongodb/mongo/commit/f8a1ac19be6279e7ace012dafa8cfcaa028d49e1

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