Boost C++ Libraries: Ticket #1958: thread_specific_ptr lacks support for NULL cleanup function https://svn.boost.org/trac10/ticket/1958 <p> Passing a null pointer as the cleanup_function argument to the thread_specific_ptr constructor leads to a null dereference and a program crash. </p> <p> Use of a null cleanup function is well defined in the pthread API: it means that no cleanup is to be performed. Boost::Thread currently lacks this mode, requiring the programmer to define a specialized empty function any time a thread_specific_ptr is created where no cleanup is desired. </p> <p> I'm filing this as a bug, since it represents a common practice, well supported and documented in the pthread API, which in boost leads to a program crash. </p> <p> I'm attaching a patch representing a potential implementation of NULL-cleanup-function support. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1958 Trac 1.4.3 Bryan Green <bryan.d.green@…> Tue, 27 May 2008 18:54:25 GMT attachment set https://svn.boost.org/trac10/ticket/1958 https://svn.boost.org/trac10/ticket/1958 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">tss_cleanup.patch</span> </li> </ul> <p> patch to apply at ROOT/boost/thread for NULL cleanup_function support </p> Ticket Anthony Williams Thu, 05 Jun 2008 12:22:33 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1958#comment:1 https://svn.boost.org/trac10/ticket/1958#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed on trunk </p> Ticket