Re: [Boost-bugs] [Boost C++ Libraries] #3926: thread_specific_ptr + dlopen library causes a SIGSEGV.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3926: thread_specific_ptr + dlopen library causes a SIGSEGV.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-10 14:45:59


#3926: thread_specific_ptr + dlopen library causes a SIGSEGV.
-----------------------------+----------------------------------------------
  Reporter: pluto@… | Owner: anthonyw
      Type: Bugs | Status: reopened
 Milestone: Boost 1.43.0 | Component: thread
   Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------+----------------------------------------------

Comment(by pluto@…):

 currently there's a crash in boost.thread core. please follow this
 scenario:

 {{{
 start thread.
   dlopen lib.
     run function from lib which uses thread_specific_ptr.
       boost::detail::create_epoch_tss_key registers delete_epoch_tss_data
 destructor.
     exit from lib function.
   dlclose lib (unload delete_epoch_tss_data code).
 exit thread
   __nptl_deallocate_tsd tries to call unloaded key destructor and crashes.
 }}}

 i think that libs/thread/src/pthread/once.cpp should contain alternative
 cleanup function with __attributte__(( destructor )):

 {{{
 if ( pthread_getspecific( epoch_tss_key ) )
   pthread_key_delete( epoch_tss_key )
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3926#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC