From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11741 invoked by alias); 20 Mar 2012 12:32:24 -0000 Received: (qmail 11729 invoked by uid 22791); 20 Mar 2012 12:32:23 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Mar 2012 12:32:01 +0000 From: "laurent.alfonsi at st dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/52604] mt allocator crashes on multi-threaded Date: Tue, 20 Mar 2012 12:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: laurent.alfonsi at st dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg01602.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52604 --- Comment #3 from Laurent Aflonsi 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