[SERVER-49797] Coverity analysis defect 115968: Uninitialized pointer field _desc Created: 22/Jul/20  Updated: 29/Oct/23  Resolved: 29/Jul/20

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Henrik Edin
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: Execution Team 2020-08-10
Participants:

 Description   

Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption. A pointer field is not initialized in the constructor
/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_sorted_impl.h:93: UNINIT_CTOR 115968 Class member declaration for "_desc".
/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_sorted_impl.cpp:1245: UNINIT_CTOR 115968 Non-static class member "_desc" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 29/Jul/20 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-49797 Initialize _desc in ephemeralForTest sorted impl in all code paths
Branch: master
https://github.com/mongodb/mongo/commit/1b29b018a18acf284ba9e6bbb4ecfb4fe85d766a

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