Boost logo

Boost :

Subject: Re: [boost] [simple_segregated_storage] segfault
From: Phil Bouchard (philippe_at_[hidden])
Date: 2008-10-01 02:53:11

"Chris Newbold" <Chris.Newbold_at_[hidden]> wrote in message
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]]
>> On Behalf Of Phil Bouchard
>> Sent: Tuesday, September 30, 2008 4:04 AM
>> I just tried the same problem today on Linux but using the latest Boost
>> 1.36
>> and I had the exact same crash.
> Hmm. What version of GCC are you using?
> One thing I found is that your shifted_ptr_test2 would not compile with
> the version of GCC I'm using (4.1.2) unless I moved the patches to
> list.tcc and stl_list.h out of the way.
> Are those patches "required"?

I have compiled the application using GCC 4.3.0 with Boost 1.35 and I got a
similar crash:

#0 0x0041ca66 in boost::simple_segregated_storage<unsigned
int>::try_malloc_n (start=@0x22fd9c, n=15, partition_size=4)
        at simple_segregated_storage.hpp:234
#1 0x0041cb58 in boost::simple_segregated_storage<unsigned int>::malloc_n
(this=0x48d030, n=16, partition_size=4)
        at simple_segregated_storage.hpp:256
#2 0x00420a4d in
(this=0x48d030, n=16)
        at pool.hpp:511
#3 0x004238ce in boost::detail::sh::pool::allocate (this=0x48d030, s=60)
        at sh_owned_base_nt.hpp:105
#4 0x00423d92 in boost::detail::sh::shifted<node>::operator new (s=60)
        at sh_owned_base_nt.hpp:215
#5 0x004192ff in list::insert (this=0x22ff34)
        at shifted_ptr_test2.cpp:49
#6 0x0040154b in main ()
        at shifted_ptr_test2.cpp:85


Boost list run by bdawes at, gregod at, cpdaniel at, john at