Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-07-11 13:10:29


Buddha Buck wrote:

> #0 0x000000000041c711 in boost::detail::atomic_conditional_increment
> (pw=0x2b3ba59cdae8) at
> vendor/include/boost/detail/sp_counted_base_gcc_x86.hpp:92
> #1 0x000000000041c743 in boost::detail::sp_counted_base::add_ref_lock
> (this=0x2b3ba59cdae0) at
> vendor/include/boost/detail/sp_counted_base_gcc_x86.hpp:138
> #2 0x000000000041d7a1 in shared_count (this=0x7fff083b7678,
> r=@0x70f4a78) at vendor/include/boost/detail/shared_count.hpp:362
> #3 0x00002b3ba3bcb6ff in shared_ptr<Observer> (this=0x7fff083b7670,
> r=@0x70f4a70) at vendor/include/boost/shared_ptr.hpp:187
> #4 0x00002b3ba3bcb745 in boost::weak_ptr<Observer>::lock
> (this=0x70f4a70) at vendor/include/boost/weak_ptr.hpp:106
> #5 0x00002b3ba3bcac9b in Subject::notifyObservers (this=0x5a91e0) at
> src/core/Observer.cpp:40
> #6 0x00002b3ba3bc320d in ObjectDB::createObject (this=0x5a91e0,
> parent=@0x7fff083b7900, type=@0x7fff083b78f0, label=@0x7fff083b78e0,
> _guid=@0x7fff083b78d0) at src/core/ObjectDB.cpp:101

Very odd address space layout; the shared_ptr code at 0x00002b3ba3bcb6ff and
the shared_count/sp_counted_base code at 0x000000000041c711. The 'this'
pointer for the sp_counted_base object - 0x2b3ba59cdae0 - seems suspicious,
too close to code, too far from the this pointer for the weak_ptr
(0x70f4a70) which should also be on the heap. Hard to say where things go
wrong. Can you post the assembly around the faulting location? Might it be
possible for the two code segments, 2b3ba3.. and 41c.., to be coming from
two separate versions of Boost?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net