[SERVER-66334] Coverity analysis defect 122186: Uninitialized scalar field Created: 10/May/22  Updated: 29/Oct/23  Resolved: 24/May/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: Sara Golemon
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-05-10 at 10.04.40 AM.png    
Issue Links:
Problem/Incident
is caused by SERVER-65664 assumptions about hardware_constructi... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2022-05-30
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/stats/counters.h:239: UNINIT_CTOR 122186 The compiler-generated constructor for this class does not initialize "_tfoKernelSetting".



 Comments   
Comment by Githook User [ 24/May/22 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-66334 Initialize NetworkCounter::_tfoKernelSetting
Branch: master
https://github.com/mongodb/mongo/commit/d2dde142b2e80f0c224e6df54f63414280b6d807

Comment by Kyle Suarez [ 16/May/22 ]

Great, thanks for checking andrew.morrow@mongodb.com. Security Team, if you think this should be suppressed in Coverity, I can mark it as "Intentional" to dismiss it.

Comment by Kyle Suarez [ 10/May/22 ]

The comment suggests this variable is initialized at startup somehow but I couldn't tell quite how that happened on glancing at the code.

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