[SERVER-37934] Coverity analysis defect 105105: Uninitialized pointer field Created: 05/Nov/18  Updated: 27/Oct/23  Resolved: 07/Nov/18

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Janna Golden
Resolution: Works as Designed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Sharding 2018-11-19
Participants:

 Description   

A pointer field is not initialized in the constructor

Defect 105105 (STATIC_C)
Checker UNINIT_CTOR (subcategory pointer)
File: /src/mongo/db/s/active_shard_collection_registry.cpp
Function mongo::ScopedShardCollection::ScopedShardCollection(mongo::ScopedShardCollection&&)
/src/mongo/db/s/active_shard_collection_registry.h, line: 156
Class member declaration for "_registry".

        ActiveShardCollectionRegistry* _registry;

/src/mongo/db/s/active_shard_collection_registry.cpp, line: 155
Non-static class member "_registry" is not initialized in this constructor nor in any functions that it calls.

    }



 Comments   
Comment by Eric Milkie [ 07/Nov/18 ]

Seems like a bug in Coverity.

Comment by Kaloian Manassiev [ 06/Nov/18 ]

Not sure why this is tripping, the move constructor seems legit to me, but also I only spent like 15 seconds looking at it

Generated at Thu Feb 08 04:47:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.