[SERVER-60381] Coverity analysis defect 120845: Uninitialized scalar field Created: 01/Oct/21  Updated: 29/Oct/23  Resolved: 05/Oct/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: Matthew Russotto
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-18
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/backup_file_cloner.h:182: UNINIT_CTOR 120845 Class member declaration for "_fileOffset".
/src/mongo/db/modules/enterprise/src/fcbis/backup_file_cloner.cpp:66: UNINIT_CTOR 120845 Non-static class member "_fileOffset" is not initialized in this constructor nor in any functions that it calls.
/src/mongo/db/modules/enterprise/src/fcbis/backup_file_cloner.h:183: UNINIT_CTOR 120845 Class member declaration for "_sawEof".
/src/mongo/db/modules/enterprise/src/fcbis/backup_file_cloner.cpp:66: UNINIT_CTOR 120845 Non-static class member "_sawEof" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 05/Oct/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-60381 Fix Coverity analysis defect 120845 by initialized _setEof and _fileOffset in file header.
Branch: fausto.leyva/SERVER-57826
https://github.com/10gen/mongo-enterprise-modules/commit/0ca33f3458e65aa3afe16ec780624bc5b2361393

Comment by Githook User [ 05/Oct/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-60381 Fix Coverity analysis defect 120845 by initialized _setEof and _fileOffset in file header.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/0ca33f3458e65aa3afe16ec780624bc5b2361393

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-60381 Fix Coverity analysis defect 120845 by initialized _setEof and _fileOffset in file header.
Branch: matthew.russotto/SERVER-60381
https://github.com/10gen/mongo-enterprise-modules/commit/c4ab43d2b7a9a4230b81190cd70ec7901e0d7ee8

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-60381 Coverity analysis defect 120845: Uninitialized scalar field
Branch: matthew.russotto/SERVER-60381
https://github.com/10gen/mongo-enterprise-modules/commit/2e9a465ba65d0633fa720ba222a57e5d7bbc92c1

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