[SERVER-59896] Coverity analysis defect 120694: Uninitialized scalar field Created: 12/Sep/21  Updated: 29/Oct/23  Resolved: 21/Sep/21

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2021-10-04
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/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.h:180: UNINIT_CTOR 120694 Class member declaration for "_initialSyncAttempt".
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.cpp:44: UNINIT_CTOR 120694 Non-static class member "_initialSyncAttempt" is not initialized in this constructor nor in any functions that it calls.
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.h:181: UNINIT_CTOR 120694 Class member declaration for "_initialSyncMaxAttempts".
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.cpp:44: UNINIT_CTOR 120694 Non-static class member "_initialSyncMaxAttempts" is not initialized in this constructor nor in any functions that it calls.
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.h:184: UNINIT_CTOR 120694 Class member declaration for "_chooseSyncSourceAttempt".
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.cpp:44: UNINIT_CTOR 120694 Non-static class member "_chooseSyncSourceAttempt" is not initialized in this constructor nor in any functions that it calls.
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.h:185: UNINIT_CTOR 120694 Class member declaration for "_chooseSyncSourceMaxAttempts".
/src/mongo/db/modules/enterprise/src/fcbis/file_copy_based_initial_syncer.cpp:44: UNINIT_CTOR 120694 Non-static class member "_chooseSyncSourceMaxAttempts" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Adi Zaimi', 'email': 'adizaimi@yahoo.com', 'username': 'adizaimi'}

Message: SERVER-59896 Initialize uint32 member variables
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/ac3572c14e27a3d1e25d7ec5b33ca3f00464704d

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