[SERVER-65541] Coverity analysis defect 122081: Uninitialized scalar field Created: 13/Apr/22  Updated: 29/Oct/23  Resolved: 21/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc5, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Joel Redman (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-04-13 at 10.10.27 AM.png    
Issue Links:
Backports
Problem/Incident
is caused by SERVER-60824 Support non-blocking sort() on cluste... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: QO 2022-04-18, QO 2022-05-02
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/query/query_solution.h:482: UNINIT_CTOR 122081 Class member declaration for "hasCompatibleCollation".
/src/mongo/db/query/query_solution.cpp:308: UNINIT_CTOR 122081 Non-static class member "hasCompatibleCollation" is not initialized in this constructor nor in any functions that it calls.



 Comments   
Comment by Githook User [ 05/May/22 ]

Author:

{'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}

Message: SERVER-65541 Fix coverity uninitialized member in CollectionScanNode
Branch: v6.0
https://github.com/mongodb/mongo/commit/95d09aba884704ca2d1e88335947d88bc9c520d0

Comment by Githook User [ 13/Apr/22 ]

Author:

{'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}

Message: SERVER-65541 Initialize 'hasCompatibleCollation' in CollectionScanNode
Branch: master
https://github.com/mongodb/mongo/commit/66cb1dcbee5ecc7c388bec5fa0136b4205f67a58

Generated at Thu Feb 08 06:02:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.