This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/14609] Stack clobbering in pthread cancellation cleanup handlers


http://sourceware.org/bugzilla/show_bug.cgi?id=14609

--- Comment #1 from joseph at codesourcery dot com <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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]