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
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to