[SERVER-59898] Coverity analysis defect 120739: Uninitialized scalar field Created: 12/Sep/21  Updated: 29/Oct/23  Resolved: 20/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: Katherine Wu (Inactive)
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: QO 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/pipeline/document_source_graph_lookup.h:282: UNINIT_CTOR 120739 Class member declaration for "_outputIndex".
/src/mongo/db/pipeline/document_source_graph_lookup.cpp:614: UNINIT_CTOR 120739 Non-static class member "_outputIndex" 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 [ 20/Sep/21 ]

Author:

{'name': 'Katherine Wu', 'email': 'katherine.wu@mongodb.com', 'username': 'kaywux'}

Message: SERVER-59898 Initialize value for $graphLookup outputIndex
Branch: master
https://github.com/mongodb/mongo/commit/d14837390af247b23cb6ca70908280107dccf986

Comment by Kyle Suarez [ 13/Sep/21 ]

It looks like this might have been introduced as part of SERVER-57168, so sending to the Query Optimization team. CC katherine.wu

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