[SERVER-55220] Coverity analysis defect 117857: Uninitialized scalar field Created: 16/Mar/21  Updated: 29/Oct/23  Resolved: 23/Mar/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Anton Korshunov
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-54322 Text query plans are not shown proper... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query Execution 2021-04-05
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/exec/plan_stats.h:778: UNINIT_CTOR 117857 Class member declaration for "docsRejected".
/src/mongo/db/exec/plan_stats.h:757: UNINIT_CTOR 117857 Non-static class member "docsRejected" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 22/Mar/21 ]

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-55220 Uninitialized scalar field
Branch: master
https://github.com/mongodb/mongo/commit/5437292b0dd3918513d3f41bc4918d8452eaa5d8

Comment by Kyle Suarez [ 16/Mar/21 ]

Assigning to anton.korshunov since it looks like the initialization of _docsRejected was missed during the change in SERVER-54322.

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