$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Is GCC
From: Roland Bock (rbock_at_[hidden])
Date: 2009-12-02 10:19:35
hce wrote:
> Hi,
> 
> I am using gcc version 4.3.0 and /lib64/libc-2.8.so on fedora 9, is it
> stable to use std::vector and std::map to contain shared_ptr<MyObject>
> MyObjectPtr? I've got libc.so Segmentation fault while accessing
> vector and map contain  MyObjectPtr.
> 
> Thank you.
> 
> Kind regards,
> 
> Jupiter
I can't say that I have used that exact same setup, but I started using 
shared pointers with STL-Containers with varying gcc versions with 64bit 
linux about 1.5 years ago and never ever had a problem with them.
But of course, shared_ptrs do not make everything fail-safe. For 
instance, a shared_ptr could contain NULL. In that case, calling a 
member function of the contained object would result in a segmentation 
fault.
You should try to boil down the problem to a few lines. You will 
probably see the problem then (or you can then ask for more specific help).
Regards,
Roland