Re: [Boost-bugs] [Boost C++ Libraries] #3837: thread_specific_ptr returns incorrect values if another one was constructed at the same address earlier

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3837: thread_specific_ptr returns incorrect values if another one was constructed at the same address earlier
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-11 07:51:49


#3837: thread_specific_ptr returns incorrect values if another one was constructed
at the same address earlier
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: thread
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------

Comment(by anonymous):

 Why the assertion should not fail? You are using a global variable optr
 ion the two threads. The following interleaving seems possible


     optr=in_place(); optr->reset(new int); // main
     optr=none; optr=in_place(); // other_thread
     assert(optr->get() == 0); //// main succeed

 As the global variable has been re-assigned with in_place().
 Am I missing something?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3837#comment:2>
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