[SERVER-38329] Coverity analysis defect 105143: Uninitialized pointer field Created: 30/Nov/18  Updated: 29/Oct/23  Resolved: 30/Nov/18

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: David Storch
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: Query 2018-12-17
Participants:

 Description   

A pointer field is not initialized in the constructor

Defect 105143 (STATIC_C)
Checker UNINIT_CTOR (subcategory pointer)
File: /src/mongo/db/exec/text_or.cpp
Function mongo::TextOrStage::TextOrStage(mongo::OperationContext *, const mongo::fts::FTSSpec &, mongo::WorkingSet *, const mongo::MatchExpression *, const mongo::Collection *)
/src/mongo/db/exec/text_or.h, line: 160
Class member declaration for "_index".

        IndexDescriptor* _index;

/src/mongo/db/exec/text_or.cpp, line: 68
Non-static class member "_index" is not initialized in this constructor nor in any functions that it calls.

          _idRetrying(WorkingSet::INVALID_ID) {}



 Comments   
Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'David Storch', 'email': 'david.storch@10gen.com', 'username': 'dstorch'}

Message: SERVER-38329 Remove unused member TextOrStage::_index.
Branch: master
https://github.com/mongodb/mongo/commit/9cfce7a295f481cc502e126dee5cb6b165f752e3

Comment by David Storch [ 30/Nov/18 ]

charlie.swanson oops! Yeah, TextOrStage::_index should have been deleted.

Comment by Charlie Swanson [ 30/Nov/18 ]

ping david.storch maybe due to a recent change of yours?

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