[SERVER-21989] Coverity analysis defect 76790: Wrapper object use after free Created: 22/Dec/15  Updated: 14/Apr/16  Resolved: 22/Dec/15

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Scott Hernandez (Inactive)
Resolution: Won't Fix Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

An internal pointer of a wrapper object remains available after the object is freed

Defect 76790 (STATIC_C)
Checker WRAPPER_ESCAPE (subcategory none)
File: /src/mongo/db/repl/sync_tail.cpp
Function mongo::repl::multiSyncApply(const std::vector<mongo::BSONObj, std::allocator<mongo::BSONObj>> &, mongo::repl::SyncTail *)
/src/mongo/db/repl/sync_tail.cpp, line: 1014
The internal representation of local "oplogEntries" escapes into "oplogEntryPointers[i]", but is destroyed when it exits scope.

            oplogEntryPointers[i] = &oplogEntries[i];



 Comments   
Comment by Scott Hernandez (Inactive) [ 22/Dec/15 ]

After looking more into this we have concluded it is a false warning.

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