[SERVER-61272] Coverity analysis defect 121076: Uninitialized scalar field Created: 05/Nov/21  Updated: 29/Oct/23  Resolved: 10/Nov/21

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

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

Issue Links:
Problem/Incident
is caused by SERVER-59495 Update recipient state machine depend... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server Serverless 2021-11-15
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/repl/tenant_migration_donor_service.h:337: UNINIT_CTOR 121076 Class member declaration for "_isAtleastFCV52AtStart".
/src/mongo/db/repl/tenant_migration_donor_service.cpp:288: UNINIT_CTOR 121076 Non-static class member "_isAtleastFCV52AtStart" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Suganthi Mani [ 10/Nov/21 ]

Addressed the issue in this  commit.

Comment by Eric Milkie [ 08/Nov/21 ]

Also the "L" in "least" should be capitalized in that identifier name.

Comment by A. Jesse Jiryu Davis [ 08/Nov/21 ]

suganthi.mani looks like this was introduced in your commit bbc96fbba2deaac539165bcd86bbdaf6037f41dd, which has been reverted. Let's fix this before committing that patch again.

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