[SERVER-67374] Coverity analysis defect 122379: Wrapper object use after free Created: 17/Jun/22  Updated: 27/Oct/23  Resolved: 28/Oct/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Henrik Edin
Resolution: Works as Designed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-06-17 at 12.37.52 PM.png    
Operating System: ALL
Sprint: Execution Team 2022-10-17, Execution Team 2022-10-31, Execution Team 2022-11-14
Participants:

 Description   

Wrapper object use after free

A use after free bug would occur if the internal pointer is used. An internal pointer of a wrapper object remains available after the object is freed
/src/mongo/db/timeseries/bucket_compression.cpp:304: WRAPPER_ESCAPE 122379 Calling "get" which extracts wrapped state from local "tamperedData".
/src/mongo/db/timeseries/bucket_compression.cpp:306: WRAPPER_ESCAPE 122379 The internal representation of local "tamperedData" escapes into "measurements.front().timeField", but is destroyed when it exits scope.


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