<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:00:25 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-813] Memory leak detected</title>
                <link>https://jira.mongodb.org/browse/CXX-813</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://evergreen.mongodb.com/task/mongodb_cpp_driver_dev_ubuntu1410_debug_asan_compile_and_test_4e7c41aaf1ffd6dee8686c690d010444879c5205_16_01_12_21_21_38&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task/mongodb_cpp_driver_dev_ubuntu1410_debug_asan_compile_and_test_4e7c41aaf1ffd6dee8686c690d010444879c5205_16_01_12_21_21_38&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="246827">CXX-813</key>
            <summary>Memory leak detected</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Jan 2016 21:39:57 +0000</created>
                <updated>Thu, 28 Jan 2016 20:11:08 +0000</updated>
                            <resolved>Fri, 22 Jan 2016 21:51:29 +0000</resolved>
                                                    <fixVersion>3.0.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1151669" author="acm" created="Fri, 22 Jan 2016 21:51:29 +0000"  >&lt;p&gt;We still don&apos;t know how to suppress it with ASAN, but we are clean on Valgrind now, so I&apos;m resolving this. I&apos;ll open a new ticket for ASAN for 3.0.1&lt;/p&gt;</comment>
                            <comment id="1151648" author="xgen-internal-githook" created="Fri, 22 Jan 2016 21:27:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-813&quot; title=&quot;Memory leak detected&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-813&quot;&gt;&lt;del&gt;CXX-813&lt;/del&gt;&lt;/a&gt; Mocks should be immortal once created&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/472f3673ee507505671a566d696b0fc1f271179a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/472f3673ee507505671a566d696b0fc1f271179a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1151567" author="acm" created="Fri, 22 Jan 2016 20:06:52 +0000"  >&lt;p&gt;We still have one leak in a system library that we need to figure out how to suppress&lt;/p&gt;</comment>
                            <comment id="1151563" author="xgen-internal-githook" created="Fri, 22 Jan 2016 20:02:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-813&quot; title=&quot;Memory leak detected&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-813&quot;&gt;&lt;del&gt;CXX-813&lt;/del&gt;&lt;/a&gt; Fix memory errors exposed by ASAN and Valgrind&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;We can&apos;t assume that libmongoc has automatically called init/cleanup&lt;br/&gt;
   for us. It only does that on some platforms. That makes it mandatory&lt;br/&gt;
   to have an instance object. Many of our tests didn&apos;t do that.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The collection::create_index method was not cleaning up the keys that&lt;br/&gt;
   had been allocated by libbson. Add the needed bson_free call.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The collection::distinct method was not cleaning up the temorary&lt;br/&gt;
   database object that it constructs. Add the needed database_destroy&lt;br/&gt;
   call.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Fix some mocks so that they write to the bson_error_t out parameter&lt;br/&gt;
   when returning a non-successful code, as otherwise these lead to&lt;br/&gt;
   read-from-uninit errors when we promote the uninitialized&lt;br/&gt;
   bson_error_t to an exception.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/1a6f33d44ae46c4afc0bca4af89dead194b77710&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/1a6f33d44ae46c4afc0bca4af89dead194b77710&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1134435" author="xgen-internal-githook" created="Wed, 13 Jan 2016 23:26:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tessavitabile&apos;, u&apos;name&apos;: u&apos;Tess Avitabile&apos;, u&apos;email&apos;: u&apos;tess.avitabile@mongodb.com&apos;}
&lt;p&gt;Message: Revert value.hpp and value.cpp in &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-813&quot; title=&quot;Memory leak detected&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-813&quot;&gt;&lt;del&gt;CXX-813&lt;/del&gt;&lt;/a&gt; and use Wno-error=maybe-uninitialized&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/de649bf1acba78db9f744c99f36a3655b540a2eb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/de649bf1acba78db9f744c99f36a3655b540a2eb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1134339" author="xgen-internal-githook" created="Wed, 13 Jan 2016 22:08:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tessavitabile&apos;, u&apos;name&apos;: u&apos;Tess Avitabile&apos;, u&apos;email&apos;: u&apos;tess.avitabile@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-813&quot; title=&quot;Memory leak detected&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-813&quot;&gt;&lt;del&gt;CXX-813&lt;/del&gt;&lt;/a&gt; Fix memory leaks&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/ad2f422db2c06ccda83d7c6f275d9e087d07fa86&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/ad2f422db2c06ccda83d7c6f275d9e087d07fa86&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1134336" author="tess.avitabile" created="Wed, 13 Jan 2016 22:07:35 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/432&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/432&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CXX-668</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrdq67:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="842">Platforms F (01/29/16)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>