Boost logo

Boost Users :

From: David M Garza (David.M.Garza_at_[hidden])
Date: 2005-12-06 21:16:21


gdb's stack trace says:

#0 0x400f8e1 in boost::detail::atomic_increment (pw=0x40006cc4)
     at sp_counted_base_gcc_ia64.hpp:38
#1 0x400f890 in boost::detail::sp_counted_base::add_ref_copy
(this=0x40006cc0)
     at sp_counted_base_gcc_ia64.hpp:117
#2 0x400f810 in boost::detail::shared_count::shared_count
(this=0x7ffff314,
     r=@0x7ffff304) at shared_count.hpp:170
#3 0x400fbc0 in boost::shared_ptr<int>::boost::shared_ptr<int> (
     this=0x7ffff310, _ctor_arg=@0x7ffff300) at smart_ptr_test.cpp:165
#4 0x400b270:0 in test () at smart_ptr_test.cpp:165
#5 0x400eef0:0 in main () at smart_ptr_test.cpp:308

David

Ben Hutchings wrote:
> David M Garza wrote:
>
>
>>When I added -DBOOST_SP_USE_PTHREADS smart_ptr_test ran, like John
>>Maddock found already. I assume the following output is correct:
>>
>>UDT with value 999888777 being destroyed
>>UDT with value 111222333 being destroyed
>>OK
>>UDT with value 54321 being destroyed
>>UDT with value 333 being destroyed
>>UDT with value 222 being destroyed
>>UDT with value 111 being destroyed
>>UDT with value 333222111 being destroyed
>>No errors detected.
>>
>>For what it's worth, it worked with both -O0 and -O2.
>>
>>Adding "-D_REENTRANT -pthread " to my original g++ command line, on the
>>other hand, did not change the original behavior.
>>
>>Combining Peter's and Ben's suggested flags works.
>>
>>
>
> If you use -DBOOST_SP_USE_PTHREADS then the IA64-specific code I wrote
> for manipulating use counts will not be used. This worked on a
> dual-Itanium system under Linux, but I have not tested it on either the
> Itanium 2 or HP-UX. (Nor am I easily able to.) If you could use gdb to
> find exactly where the segmentation fault or bus error occurs, that
> might help me to track down the bug. You'll need to use the -g option to
> g++ in order for gdb to produce useful information.
>
> Ben.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>


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