[SERVER-59188] Coverity analysis defect 120391: Uninitialized scalar field Created: 09/Aug/21  Updated: 29/Oct/23  Resolved: 12/Aug/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.3, 4.4.9, 5.1.0-rc0

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

Attachments: PNG File Screen Shot 2021-08-09 at 8.31.36 AM.png    
Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
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_unwind.cpp:92: UNINIT_CTOR 120391 Class member declaration for "_index".
/src/mongo/db/pipeline/document_source_unwind.cpp:102: UNINIT_CTOR 120391 Non-static class member "_index" 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 [ 16/Aug/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-58582 Create $documents stage and implement collectionless unionWith (cherry-picked from commit 0d2789815060cf2d7ac511cf6a1be966243b5e84) (cherry-picked from commit dcb0c2f2001fc17be51c38db1319197973758a8c)

SERVER-59188 Fix coverity issue in DocumentSourceUnwind

(cherry-picked from commit bb6e1f9f7ae13210b99a84cfef08eeb0d2d0a86a)
(cherry-picked from commit e1112c5fa3509664d6997dea3f314e067ba1e82a)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0f9e41dd9730b9bb4db3fcee4fef634922337061

Comment by Githook User [ 12/Aug/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-59188 Fix coverity issue in DocumentSourceUnwind

(cherry-picked from commit bb6e1f9f7ae13210b99a84cfef08eeb0d2d0a86a)
Branch: v5.0
https://github.com/mongodb/mongo/commit/e1112c5fa3509664d6997dea3f314e067ba1e82a

Comment by Githook User [ 12/Aug/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-59188 Fix coverity issue in DocumentSourceUnwind
Branch: master
https://github.com/mongodb/mongo/commit/bb6e1f9f7ae13210b99a84cfef08eeb0d2d0a86a

Comment by Ted Tuckman [ 12/Aug/21 ]

This code is being backported to 5.0 and 4.4, so we'll need this patch as well.

Comment by Kyle Suarez [ 09/Aug/21 ]

FYI ruslan.abdulkhalikov and ted.tuckman, seems related to SERVER-58582.

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