Boost logo

Boost Users :

From: David M Garza (David.M.Garza_at_[hidden])
Date: 2005-12-12 22:59:26


smart_ptr_test still fails. I compiled with

g++ -I ../../.. -D_REENTRANT -pthread -g -o smart_ptr_test
smart_ptr_test.cpp

The gdb output is

(gdb) run
Starting program:
/disk3/users4/dgarza/boost_test/boost_cvs/boost/libs/smart_ptr/test/smart_ptr_test

UDT with value 999888777 being destroyed
UDT with value 111222333 being destroyed

Program received signal SIGSEGV, Segmentation fault
   si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x400f881 in boost::detail::atomic_increment (pw=0x40006cc4)
     at sp_counted_base_gcc_ia64.hpp:51
warning: Compilation directory is not absolute; could result in
incorrect behavior. Please report to HP.
51 "r"(pw));
(gdb) where
#0 0x400f881 in boost::detail::atomic_increment (pw=0x40006cc4)
     at sp_counted_base_gcc_ia64.hpp:51
#1 0x400f830 in boost::detail::sp_counted_base::add_ref_copy
(this=0x40006cc0)
     at sp_counted_base_gcc_ia64.hpp:130
#2 0x400f7b0 in boost::detail::shared_count::shared_count
(this=0x7ffff2e4,
     r=@0x7ffff2d4) at shared_count.hpp:216
#3 0x400fb60 in boost::shared_ptr<int>::boost::shared_ptr<int> (
     this=0x7ffff2e0, _ctor_arg=@0x7ffff2d0) at smart_ptr_test.cpp:165
#4 0x400b210:0 in test () at smart_ptr_test.cpp:165
#5 0x400ee90:0 in main () at smart_ptr_test.cpp:308

I grabbed the CVS instead of using the 1.33.0 package I was working with
before. I assume this was what you intended?

As an aside, do I gather correctly from the presence of "-D_REENTRANT
-pthread" the smart pointer code is multithreaded? Anything I write
using smart pointers, regardless of whether or not my code is
multithreaded, will require the flags?

David


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