This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/52604] mt allocator crashes on multi-threaded
- From: "laurent.alfonsi at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Mar 2012 12:31:31 +0000
- Subject: [Bug libstdc++/52604] mt allocator crashes on multi-threaded
- Auto-submitted: auto-generated
- References: <bug-52604-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52604
--- Comment #3 from Laurent Aflonsi <laurent.alfonsi at st dot com> 2012-03-20 12:31:31 UTC ---
Well, in fact I am facing a runtime crash on another target (SH4). The crash is
fixed by the patch proposed previously.
On the other hand, I ve tried to reproduce on x86, to easily report on gcc
bugs. and I ve discovered this valgrind error.
I first thought both issues were the same, but they are not. And you are right,
my patch doesn't fix the valgrind error. Sorry for confusion.
The _M_thread_freelist might also be set to NULL at some point. (may be also in
~__freelist()). Setting _M_thread_freelist to NULL at ~__freelist() is solves
the valgrind error, but I m not sure this is the right place to do it.
Thanks