[SERVER-15473] BtreeInterfaceImpl::getBulkBuilder leaks a BtreeLogic<BtreeBuilder> object Created: 30/Sep/14  Updated: 25/Oct/14  Resolved: 07/Oct/14

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.7.6
Fix Version/s: 2.7.8

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: 28qa, address-sanitizer, leak-sanitizer, memory-leak
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Found by inspection based on memory leak reported by leak sanitizer.

Participants:

 Description   

The BtreeInterfaceImpl::getBulkBuilder method passes a BtreeLogic<OnDiskFormat>::Builder object (new'ed in BtreeLogic<OnDiskFormat>::newBuilder) to the constructor of a BtreeBuilderInterfaceImpl<OnDiskFormat> object, which appears to take ownership of the Builder object. However, the destructor of the BtreeBuilderInterfaceImpl object does not delete the BtreeLogic<OnDiskFormat>::Builder object, and no other references exist.



 Comments   
Comment by Githook User [ 07/Oct/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-15473 Take ownership of provided Builder
Branch: master
https://github.com/mongodb/mongo/commit/4650dc8ef7c078c82e9d7f63a79e2d63eb27c0df

Comment by Geert Bosch [ 07/Oct/14 ]

Sure, thanks. It's not a priority for me now, as I'm on the critical path for
getting collection locking in.

-Geert

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