Attaching the code (in whatever form is convenient to you) is fine. OK, I've attached some sample code I made up to show the kind of problems I'm having (the code doesn't do anything useful). Running this code results in the backtrace below. I am aware that this code breaks the condition that the shared_ptr needs to have exclusive writing modifications; however, I am unsure how to fix the code to make it correct. Please let me know if you have any suggestions, thanks! (BTW, I'm running against the Boost CVS which I downloaded on Fri, Apr 22nd; if I run against version 1_32, the backtrace is in the scope_lock instead of atomic_increment)
some info about my system:
Red Hat Enterprise Linux 3, running 2.4.21-4.ELsmp
(on a dual-processor dell with xeon's, if that matters)
and here's the backtrace:
(gdb) bt
#0 0x0804a703 in atomic_increment (pw=0x21006) at
sp_counted_base_gcc_x86.hpp:59
#1 0x0804a655 in boost::detail::sp_counted_base::add_ref_copy
(this=0x21002) at sp_counted_base_gcc_x86.hpp:133
#2 0x0804a4d7 in boost::detail::shared_count::operator= (this=0xb191cde8,
r=@0xb731e004) at shared_count.hpp:181
#3 0x08049a58 in boost::shared_ptr<Element>::operator= (this=0xb191cde4,
r=@0xb731e000) at shared_ptr.hpp:148
#4 0x0804b089 in SimpleQueue::pop (this=0x804f290) at ../SimpleQueue.cpp:22
#5 0x080494ef in CommonThread::operator() (this=0x8050470) at
../CommonThread.cpp:11
#6 0x0804a06d in
boost::detail::function::void_function_obj_invoker0