Boost logo

Boost :

Subject: Re: [boost] [Block.Pointer][Container] Works!
From: Ben Pope (benpope81_at_[hidden])
Date: 2016-03-05 13:07:55


On Friday, March 04, 2016 10:14 AM, Phil Bouchard wrote:
> On 03/03/2016 08:30 PM, Phil Bouchard wrote:
>> On 03/02/2016 11:42 PM, Phil Bouchard wrote:
>>>
>>> It works with -O0 so for the moment I have no idea what's going on
>>> there.
>>
>> Sorry wrong call; I fixed a memory corruption bug but now block_ptr<>
>> doesn't work anymore with the Boost.Container. And this time this is
>> consistent unfortunately.
>>
>> I will try to figure out if I can fix it.
>
> Everything works well if I comment:
>
> template<class Allocator, class ICont>
> struct node_alloc_holder
> {
>
> [...]
>
> ~node_alloc_holder()
> { /*this->clear(alloc_version());*/ }
>
>
> It seems like the nodes destroy themselves before the list attempts to
> destroy them.
>
> I am pretty sure block_ptr<> is neat now as I reviewed it many times. If
> I could have some help solving this that would be great.

If you haven't used asan (address-sanitizer) you may find it throws a
fair bit of light on the subject.

If using gcc or clang, just add -fsanitize=address to the compiler
command line.

Ben


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