[Thread] Wave segfaults at application cleanup in thread library

Hi all, Since a couple of days (2-3 days) the Wave tests started to fail because of a crash during application cleanup in the thread library (msvc-8, gcc3.4.5/Mingw - this problem seems to be constrained to the windows platform). The point of the segfault is here: boost/thread/win32/tss.hpp:+30, void cleanup(T* data) const { if(func) { func(data); // <-- here } else { delete data; } } Where data is a valid pointer, but func points somewhere. No code changes have been done lately in Wave (or in Spirit/Phoenix for that matter, because the tss is used in Spirit code). Any clues what might be the reason? Regards Hartmut

Hartmut Kaiser <hartmut.kaiser <at> gmail.com> writes:
Since a couple of days (2-3 days) the Wave tests started to fail because of a crash during application cleanup in the thread library (msvc-8, gcc3.4.5/Mingw - this problem seems to be constrained to the windows platform).
The point of the segfault is here: boost/thread/win32/tss.hpp:+30,
void cleanup(T* data) const { if(func) { func(data); // <-- here } else { delete data; } }
Where data is a valid pointer, but func points somewhere.
No code changes have been done lately in Wave (or in Spirit/Phoenix for that matter, because the tss is used in Spirit code). Any clues what might be the reason?
I changed the TSS code recently, so that must be the problem. This implies that there is a race between the thread_specific_ptr constructor or destructor and the wave code that uses it. Such a race is not a new problem, though it obviously has new consequences. I'll look into it. Anthony

Anthony,
No code changes have been done lately in Wave (or in Spirit/Phoenix for that matter, because the tss is used in Spirit code). Any clues what might be the reason?
I changed the TSS code recently, so that must be the problem. This implies that there is a race between the thread_specific_ptr constructor or destructor and the wave code that uses it. Such a race is not a new problem, though it obviously has new consequences. I'll look into it.
Thanks. Please let me know if can be of any assistance. Regards Hartmut
participants (2)
-
Anthony Williams
-
Hartmut Kaiser