<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:14:15 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>[CDRIVER-2123] Crash when destroying bson objects</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2123</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;I am trying to use this driver in a multi-threading application. I am using client pool and make sure that using a cursor is always done in the same thread.&lt;/p&gt;

&lt;p&gt;However, if the first use is always successful (each are begining by mongoc_init(); and treminated by 	mongoc_cleanup()&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; following ones frequently crash, always when destroying something. It says something about heap corruption or writing past the heap limit.&lt;/p&gt;

&lt;p&gt;I have been able to avoid this by providing my own memory functions and resetting the vtable.&lt;/p&gt;

&lt;p&gt;Is there another way to avoid these problems?&lt;/p&gt;</description>
                <environment>Windows 10 64 bit</environment>
        <key id="372120">CDRIVER-2123</key>
            <summary>Crash when destroying bson objects</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="13202">Works as Designed</resolution>
                                        <assignee username="bjori">Hannes Magnusson</assignee>
                                    <reporter username="Buggynours">Olivier Bertrand [X]</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Apr 2017 20:17:04 +0000</created>
                <updated>Fri, 27 Oct 2023 13:14:21 +0000</updated>
                            <resolved>Fri, 7 Apr 2017 21:01:15 +0000</resolved>
                                    <version>1.6.2</version>
                                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1544192" author="buggynours" created="Fri, 7 Apr 2017 22:10:47 +0000"  >&lt;p&gt;That was it, thanks.&lt;/p&gt;</comment>
                            <comment id="1544094" author="bjori" created="Fri, 7 Apr 2017 21:01:15 +0000"  >&lt;p&gt;Calling &lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_init.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongoc_init&lt;/a&gt; and especially &lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_cleanup.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongoc_cleanup&lt;/a&gt; multiple times will definitely lead to all sorts of weirdness, including heap corruption.&lt;/p&gt;

&lt;p&gt;Feel free to re-open this ticket if removing the extra calls does not fully resolve the problem.&lt;/p&gt;</comment>
                            <comment id="1544092" author="buggynours" created="Fri, 7 Apr 2017 20:57:02 +0000"  >&lt;p&gt;No, they are called several times. I will try to change that and tell you.&lt;/p&gt;</comment>
                            <comment id="1544069" author="bjori" created="Fri, 7 Apr 2017 20:38:40 +0000"  >&lt;p&gt;I don&apos;t suppose you have a minimal example that reproduce this issue?&lt;/p&gt;


&lt;p&gt;Also, just to clarify. You only run &lt;tt&gt;mongoc_init()&lt;/tt&gt; &amp;amp; &lt;tt&gt;mongoc_cleanup()&lt;/tt&gt; at most once for the entire lifetime of the &lt;em&gt;process&lt;/em&gt; right?&lt;br/&gt;
These functions should not be called by per thread.&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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsxtev:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>