|
Threads-Devel : |
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-04-20 02:29:21
Roland Schwarz wrote:
> Johan Nilsson wrote:
>> [cross-posting this to boost.threads.devel as I tried putting out a
>> request for support there as well]
>>
>
> Thank you for analysis, I'll try to look into it as soon as possible.
Please.
>
> Please do understand, that since we are already in code freeze for
> 1.34 application of a fix is subject to Thomas Witts approval.
Yes, I understand this. Still, in the current implementation for Win32 +
msvc (static library) this dangling pointer access is consistent in my test
cases and probably in many others where it is simply undetected.
Unfortunately, this does not always result in program crashes when the
already freed memory is accessed.
The patch is simple in terms of code, and if you could confirm my analysis,
we could perhaps convince Thomas to include this into the current release.
It is a real showstopper for me in my current project, and I've been
planning to use a released Boost 1.34 as one of my support libraries. Can't
wait until 1.35.
In a longer perspective I suggest that the on_thread_exit call for the main
thread to be called later point in deinitialization (always after the static
object destruction, at least the user supplied ones).
/ Johan