|
Boost : |
Subject: Re: [boost] [serialization][trunk] Latest patch for void_cast.cpp causes segfaults
From: Sohail Somani (sohail_at_[hidden])
Date: 2009-06-17 11:31:34
Hartmut Kaiser wrote:
>> apparently the latest patch to
>> boost/libs/serialization/src/void_cast.cpp
>> (rev.53078, svn:date: 2009-05-18T06:25:56.023190Z, svn:author: ramey,
>> svn:log: fix errors in extended_type_info management) causes an
>> existing application to segfault during cleanup. The application was
>> working properly before. The attached patch fixes the issue.
>>
>> Ok to commit?
>
> Ping?
> Regards Hartmut
I know it's not a "memory leak" the way you've done it because it's in
cleanup, but I changed the code to the following:
set_type::value_type p = *it;
s.erase(it);
delete p;
it = s.begin();
If I had delete *it before the erase() call, all hell broke loose and I
do not understand why (and have not had time to figure out yet.)
-- Sohail Somani http://uint32t.blogspot.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk