[CXX-813] Memory leak detected Created: 12/Jan/16  Updated: 28/Jan/16  Resolved: 22/Jan/16

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.0

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: C++11 Driver MongoDB 3.2

 Description   

https://evergreen.mongodb.com/task/mongodb_cpp_driver_dev_ubuntu1410_debug_asan_compile_and_test_4e7c41aaf1ffd6dee8686c690d010444879c5205_16_01_12_21_21_38



 Comments   
Comment by Andrew Morrow (Inactive) [ 22/Jan/16 ]

We still don't know how to suppress it with ASAN, but we are clean on Valgrind now, so I'm resolving this. I'll open a new ticket for ASAN for 3.0.1

Comment by Githook User [ 22/Jan/16 ]

Author:

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

Message: CXX-813 Mocks should be immortal once created
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/472f3673ee507505671a566d696b0fc1f271179a

Comment by Andrew Morrow (Inactive) [ 22/Jan/16 ]

We still have one leak in a system library that we need to figure out how to suppress

Comment by Githook User [ 22/Jan/16 ]

Author:

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

Message: CXX-813 Fix memory errors exposed by ASAN and Valgrind

  • We can't assume that libmongoc has automatically called init/cleanup
    for us. It only does that on some platforms. That makes it mandatory
    to have an instance object. Many of our tests didn't do that.
  • The collection::create_index method was not cleaning up the keys that
    had been allocated by libbson. Add the needed bson_free call.
  • The collection::distinct method was not cleaning up the temorary
    database object that it constructs. Add the needed database_destroy
    call.
Comment by Githook User [ 13/Jan/16 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: Revert value.hpp and value.cpp in CXX-813 and use Wno-error=maybe-uninitialized
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/de649bf1acba78db9f744c99f36a3655b540a2eb

Comment by Githook User [ 13/Jan/16 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: CXX-813 Fix memory leaks
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/ad2f422db2c06ccda83d7c6f275d9e087d07fa86

Comment by Tess Avitabile (Inactive) [ 13/Jan/16 ]

https://github.com/mongodb/mongo-cxx-driver/pull/432

Generated at Wed Feb 07 22:00:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.