[SERVER-70228] Coverity analysis defect 133944: Uninitialized pointer field Created: 05/Oct/22  Updated: 29/Oct/23  Resolved: 20/Oct/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Rui Liu
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-10-05 at 9.57.36 AM.png    
Issue Links:
Problem/Incident
is caused by SERVER-70039 Implement optimization for $dateTrunc... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-10-17, QE 2022-10-31
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/query/datetime/date_time_support.h:389: UNINIT_CTOR 133944 The compiler-generated constructor for this class does not initialize "_tzInfo".



 Comments   
Comment by Githook User [ 18/Oct/22 ]

Author:

{'name': 'Rui Liu', 'email': 'rui.liu@mongodb.com', 'username': 'lriuui0x0'}

Message: SERVER-70228 Initialize unused pointer field in TimeZone
Branch: master
https://github.com/mongodb/mongo/commit/519c94b49f4cecdf2dd721876362f0fd2d240e55

Comment by Kyle Suarez [ 05/Oct/22 ]

CC rui.liu@mongodb.com

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