Boost logo

Boost :

Subject: Re: [boost] [simple_segregated_storage] segfault
From: Phil Bouchard (philippe_at_[hidden])
Date: 2008-09-30 04:03:36


"Chris Newbold" <Chris.Newbold_at_[hidden]> wrote in message
news:6F6A2FC198A0F943ACC2259C38A2E30B6B6FB4BD89_at_EXCHANGE-AH.ad.mathworks.com...

[...]

> Phil--
>
> I created a ticket based on your previous report of this problem; see
> http://svn.boost.org/trac/boost/ticket/2360 . So far, however, I have been
> unable to reproduce the problem with the version of shifted_ptr_test2 in
> boost/sandbox. Any additional information you can provide would be
> appreciated.
>
> Your test case also revealed a crash on exit related to a problem with
> static initialization ordering in Boost.Pool. I'm currently testing a fix
> for that problem; see http://svn.boost.org/trac/boost/ticket/2359

I just tried the same problem today on Linux but using the latest Boost 1.36
and I had the exact same crash.

So I decided rounding the allocated chunk size up to sizeof(int) instead of
sizeof(char), I ran the test again and I end up with a different crash.
Here is the new backtrace:

#0 0x0042e77d in boost::details::PODptr<unsigned int>::next (this=0x22fdb8)
    at pool.hpp:121
#1 0x0042e1c1 in
boost::pool<boost::default_user_allocator_new_delete>::find_POD
(this=0x463010, chunk=0x3e4808)
    at pool.hpp:576
#2 0x0042e138 in
boost::pool<boost::default_user_allocator_new_delete>::is_from
(this=0x463010, chunk=0x3e4808)
    at pool.hpp:276
#3 0x0041d575 in boost::detail::sh::shifted_ptr<node>::operator=<node>
(this=0x22ff58, p=0x3e5028)
    at shifted_ptr.hpp:217
#4 0x0041190e in list::insert (this=0x22ff50)
    at shifted_ptr_test2.cpp:49
#5 0x00401492 in main ()
    at shifted_ptr_test2.cpp:85

I simply added & used "detail::sh::pool::chunk_size_" of file
"boost/detail/sh_owned_base_nt.hpp".

-Phil


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk