Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2003-08-05 00:58:07


Bugs item #783308, was opened at 2003-08-04 22:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=783308&group_id=7586

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: John V Sichi (perfecthash)
Assigned to: Nobody/Anonymous (nobody)
Summary: tss::set(0) leads to double-free

Initial Comment:
This bug only occurs on non-pthreads platforms such as
Win32 where no automatic destructor is available. I
declared a variable:

boost::thread_specific_ptr<X> pX;

and initialized it:

pX.reset(new X);

Later, I did

pX.reset();

Subsequently, when pX went out of scope, it tried to
delete the X instance again. It's easy to see why.
tss::set checks

if (value && m_cleanup) {
   update cleanup handler table
}

So if value is NULL, the original cleanup handler is
left lying around.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=783308&group_id=7586

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


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