From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26000 invoked by alias); 14 May 2014 10:43:03 -0000 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 Received: (qmail 25946 invoked by uid 48); 14 May 2014 10:42:58 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/60966] std::call_once sometime hangs Date: Wed, 14 May 2014 10:43: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-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg01279.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60966 --- Comment #13 from Jonathan Wakely --- (In reply to Hideaki Kimura from comment #11) > Hi, I'm also (seemingly) hitting this issue. > When I run my program with valgrind, I get what Thomas reported. > > ==22319== Invalid read of size 4 > ==22319== at 0x370940D201: pthread_once (pthread_once.S:111) > ==22319== by 0x4C80524: .... (gthr-default.h:699) > ... > ==22319== Address 0x52c52a4 is 132 bytes inside a block of size 136 free'd > ==22319== at 0x4A07991: operator delete(void*) (in > /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) > ==22319== by 0x4C82456: ... (shared_ptr_base.h:161) > ==22319== by 0x370C4B52AF: execute_native_thread_routine (thread.cc:84) > ==22319== by 0x3709407F32: start_thread (pthread_create.c:309) > ==22319== by 0x37090F4DEC: clone (clone.S:111) > ==22319== This means you are waiting on an object that has gone out of scope. WIthout more information it's not possible to tell if this is a bug in your program or the standard libary. I'll try to reproduce it with Thomas's code...