From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19441 invoked by alias); 23 Sep 2012 19:25:21 -0000 Received: (qmail 19151 invoked by uid 55); 23 Sep 2012 19:24:59 -0000 From: "joseph at codesourcery dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug nptl/14609] Stack clobbering in pthread cancellation cleanup handlers Date: Sun, 23 Sep 2012 19:25: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-09/txt/msg00219.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14609 --- Comment #1 from joseph at codesourcery dot com 2012-09-23 19:24:58 UTC --- To quote the Rationale for the 1996 edition of POSIX.1 (since various bits of POSIX rationale may well not have ended up integrated in the versions of POSIX based on the Single Unix Specification), "it is an explicit goal of this standard to be compatible with existing exception facilities and languages having exceptions" (B.18.1.3 Thread Cancellation Cleanup Handlers, page 579, lines 9213-9215). Then, B.18.2.3 Establishing Cancellation Handlers, page 582, lines 9312-9314, "A more ambitious implementation of these routines might do even better by allowing the compiler to note that the cancellation cleanup handler is a constant and can be expanded inline.". And B.18.3 Language-Independent Cancellation Functionality, page 585, lines 9455-9459: "It is intended that bindings be able to use language exception facilities as part of the implementation of thread cancellation. In particular, it would be desirable to have thread cancellation, cancellation scopes, and their associated cleanup code map into exception raise, exception scopes, and exception handlers in languages providing them.". I think that exceptions, associated unwinding and execution of cleanup handlers in the context where pthread_cleanup_push was called were pretty clearly intended to be allowed as an approach for implementing cancellation. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.