[SERVER-64735] Coverity analysis defect 121920: Uninitialized pointer field Created: 21/Mar/22  Updated: 29/Oct/23  Resolved: 06/May/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: Eric Cox (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-03-21 at 10.49.37 AM.png    
Issue Links:
Backports
Problem/Incident
is caused by SERVER-63678 Implement a new SBE PlanStage for $lo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: QE 2022-04-04, QE 2022-04-18, QE 2022-05-02, QE 2022-05-16
Participants:

 Description   

Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption. A pointer field is not initialized in the constructor
/src/mongo/db/exec/sbe/stages/hash_lookup.h:136: UNINIT_CTOR 121920 Class member declaration for "_inOuterMatchAccessor".
/src/mongo/db/exec/sbe/stages/hash_lookup.cpp:58: UNINIT_CTOR 121920 Non-static class member "_inOuterMatchAccessor" is not initialized in this constructor nor in any functions that it calls.
/src/mongo/db/exec/sbe/stages/hash_lookup.h:138: UNINIT_CTOR 121920 Class member declaration for "_inInnerMatchAccessor".
/src/mongo/db/exec/sbe/stages/hash_lookup.cpp:58: UNINIT_CTOR 121920 Non-static class member "_inInnerMatchAccessor" is not initialized in this constructor nor in any functions that it calls.



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

Author:

{'name': 'Eric Cox', 'email': 'eric.cox@mongodb.com', 'username': 'ericox'}

Message: SERVER-64735 Fix uninitialized pointer field in HashLookupStage

(cherry picked from commit ba5b14fdf75690e5ea663b2c8518542fd28e65c6)
Branch: v6.0
https://github.com/mongodb/mongo/commit/5f3510b1b1f710ab454ccb3cfe1461efbbb73238

Comment by Githook User [ 06/May/22 ]

Author:

{'name': 'Eric Cox', 'email': 'eric.cox@mongodb.com', 'username': 'ericox'}

Message: SERVER-64735 Fix uninitialized pointer field in HashLookupStage
Branch: master
https://github.com/mongodb/mongo/commit/ba5b14fdf75690e5ea663b2c8518542fd28e65c6

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