From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37209 invoked by alias); 20 May 2015 00:09:48 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 37172 invoked by uid 48); 20 May 2015 00:09:44 -0000 From: "msebor at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug nptl/18435] pthread_once hangs when init routine throws an exception Date: Wed, 20 May 2015 00:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.21 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg00179.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18435 --- Comment #1 from Martin Sebor --- Created attachment 8326 --> https://sourceware.org/bugzilla/attachment.cgi?id=8326&action=edit Proposed patch tested on powerpc64le and x86_64. The attached patch fixes the problem by replacing the problematic pthread_cleanup_push and pthread_cleanup_pop macros with a cleanup handler. 2015-05-19 Martin Sebor * nptl/pthread_once (CleanupInfo): New struct. (clear_once_control): Replace... (cleanup_maybe_clear_once_control): ...with this. (__pthread_once_slow): Replace calls to pthread_cleanup_push and pthread_cleanup_pop with a cleanup object of struct CleanupInfo . * nptl/tst-once5.cc: New test. -- You are receiving this mail because: You are on the CC list for the bug.