[Boost-bugs] [Boost C++ Libraries] #1007: boost::signals::trackable::operator= bug

Subject: [Boost-bugs] [Boost C++ Libraries] #1007: boost::signals::trackable::operator= bug
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-05-29 00:45:34


#1007: boost::signals::trackable::operator= bug
-----------------------+----------------------------------------------------
 Reporter: anonymous | Type: Bugs
   Status: new | Milestone:
Component: signals | Version: release 1.34.0
 Severity: Problem | Keywords:
-----------------------+----------------------------------------------------
 Boost: 1.34.0
 Compiler: MSVC 8.0 (without SP1).

 Here is, minimal example.

 struct Conn : public boost::signals::trackable
 {
     void operator()(){}
 };

 void f()
 {
     boost::signal<void ()> sig;
     Conn c;
     sig.connect( c );

     c = Conn(); // crash inside..
 }


 The reason is simple. During clear() method of std::list, there are
 signals::connection destructor calls are happening, which, in turn,
 calling
 erase method of the same std::list, and as a result we're getting
 _DEBUG_ERROR("list erase iterator outside range");

 I guess, the bug is with "dying" variable: in destructor, it was set to
 true, and then signals::connection destructors are not trying to remove
 themself from the std::list. But in boost::signals::trackable::operator=()
 there is no dying flag marking.

 Evgeny.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1007>
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:49:55 UTC