Boost C++ Libraries: Ticket #5696: win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL https://svn.boost.org/trac10/ticket/5696 <p> Due to changes made in addressing Ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4736" title="#4736: Bugs: MinGW: tss crashes (SIGSEGV) in ~thread_specific_ptr (closed: fixed)">#4736</a> when using a thread_specific_ptr that has been constructed with a NULL tss_cleanup_function, reset() will not set the data to anything. Previously this would work fine, with no cleanup function being called. </p> <p> Looking at the documentation, behaviour is not specifically defined when the cleanup function is NULL, but the previous behaviour was consistent with how the pthreads implementation works, as well as being logical. </p> <p> to fix line 597 of libs\thread\src\win32\thread.cpp should change from: </p> <p> else if(func &amp;&amp; tss_data) </p> <p> to: </p> <p> else </p> <p> I don't think this was necessary to fix the original bug, but I haven't tested this. As there was another patch applied after the one that added this change, as the first patch caused other breakages maybe it was meant to have been reverted anyway (but wasn't). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5696 Trac 1.4.3 barney.wrightson@… Wed, 10 Aug 2011 23:17:06 GMT cc set https://svn.boost.org/trac10/ticket/5696#comment:1 https://svn.boost.org/trac10/ticket/5696#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">barney.wrightson@…</span> added </li> </ul> Ticket viboes Tue, 20 Dec 2011 18:39:46 GMT owner, status changed https://svn.boost.org/trac10/ticket/5696#comment:2 https://svn.boost.org/trac10/ticket/5696#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sun, 09 Sep 2012 14:42:55 GMT <link>https://svn.boost.org/trac10/ticket/5696#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5696#comment:3</guid> <description> <p> Shouldn't the fix for 2797 fix this issue also? </p> <p> Committed in trunk <a class="changeset" href="https://svn.boost.org/trac10/changeset/80236" title="Thread: 7045: make boost_thread don't depend on boost_chrono for win ...">[80236]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 09 Sep 2012 18:06:23 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/5696#comment:4 https://svn.boost.org/trac10/ticket/5696#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.52.0</span> </li> </ul> <p> Merged to release <a class="changeset" href="https://svn.boost.org/trac10/changeset/80450" title="Thread: merge from trunk: 1.52">[80450]</a>. </p> Ticket barney.wrightson@… Mon, 08 Oct 2012 03:37:51 GMT <link>https://svn.boost.org/trac10/ticket/5696#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5696#comment:5</guid> <description> <p> Yes, it looks like the fix for 2797 resolves the issue. </p> </description> <category>Ticket</category> </item> </channel> </rss>