[SERVER-50876] Coverity analysis defect 115609: Uninitialized scalar field Created: 11/Sep/20  Updated: 29/Oct/23  Resolved: 15/Sep/20

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-47125 Require ReplSetMetadata.isPrimary, re... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2020-10-05
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/rpc/metadata/repl_set_metadata.h:152: UNINIT_CTOR 115609 The compiler-generated constructor for this class does not initialize "_isPrimary".



 Comments   
Comment by Githook User [ 15/Sep/20 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-50876 Initialize ReplSetMetadata::_isPrimary

Fix Coverity "Uninitialized scalar field" warning.
Branch: master
https://github.com/mongodb/mongo/commit/36ea8b0d3121de182df18ecc573334cb01f7e6d9

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