Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2007-05-03 04:31:06


"Johan Nilsson" <r.johan.nilsson_at_[hidden]> writes:

> I believe I've found a bug in tss.cpp, for details please ref
> http://article.gmane.org/gmane.comp.lib.boost.user/26591 .
>
> The immediate fix is straightforward, it just involves resetting the native
> tss value after deleting the pointed-to data at thread exit. Patch is
> attached to this message. The changes only affects the Win32 platform and
> I've run the supplied tests under libs/thread/test to verify that it doesn't
> break anything obvious.
>
> As the bug involves dereferencing a dangling pointer and isn't detected most
> of the time, I'd really appreciate if the patch could be accepted as soon as
> possible. I'm awaiting Roland Schwartz to "bless" the patch. If he agrees,
> would it be possible to accept this for 1.34?

Your patch calls TlsSetValue after calling cleanup_slots. cleanup_slots may
call TlsFree, in which case this is not a safe thing to do. A correct fix
would require further investigation.

Anthony

-- 
Anthony Williams
Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

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