Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr leaking memory and crashing / gcc 3.4.6
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-10-29 10:04:47


> Anybody interested in this or could point me to a different boost list?
>
> Michael wrote:
>> Hello,
>>
>> I figured that shared_ptr (boost 3.4, but I don't think this is really a
>> boost problem) will lose memory in the following example
...
>> int main(int argc, char** argv)
>> {
>> while (true)
>> {
>> XRef myX;
>> try
>> {
>> myX = getx();
>> }
>> catch(...)
>> {
>> }
>> }
>> }
...
>> Platform is FreeBSD 6, gcc 3.4.6. It only happens when compiled like
>> above (without optimization).

I'm interested in principle in everything concerning shared_ptr, but I'm not
sure what we can do about this specific case. Maybe report it to the GCC
Bugzilla? Is 3.4.6 even being maintained?

--
Peter Dimov
http://www.pdplayer.com 

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net