Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000613 [1003.1(2008)/Issue 7] System Interfaces Editorial Omission 2012-09-24 21:41 2012-09-24 21:41
Reporter dalias View Status public  
Assigned To ajosey
Priority normal Resolution Open  
Status Under Review  
Name Rich Felker
Organization musl libc
User Reference
Section pthread_cleanup_push
Page Number unknown
Line Number unknown
Interp Status ---
Final Accepted Text
Summary 0000613: Relationship of automatic object lifetimes to cancellation cleanup functions is not specified
Description Purportedly it is the intent of the standard to allow implementation of thread cancellation and cleanup functions using language-level exception handling, such as the exception extensions to the C language offered by GCC. However, nowhere is it specified that acting on a cancellation request prematurely terminates execution of any block; thus, by a strict reading of the standard as written, cleanup handlers are permitted to access objects with automatic storage duration whose lifetimes have not ended at the point where cancellation is acted upon, but whose lifetimes would have ended if an otherwise-equivalent exception were thrown from that point.

A manifestation of this issue in the GNU C library can be seen in this issue report, which I filed:

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

Also, the follow-up on the issue tracker cites language in the rationale for the original 1996 standard, which I cannot find in the current standard, clarifying that such exception-based implementations were intended to be permitted.
Desired Action Adding language to this effect in the specification of pthread_cleanup_push should be sufficient:

"Invoking a cancellation cleanup function may terminate the execution of any block being executed by the thread whose execution began began after the corresponding invocation of pthread_cleanup_push."
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-09-24 21:41 dalias New Issue
2012-09-24 21:41 dalias Status New => Under Review
2012-09-24 21:41 dalias Assigned To => ajosey
2012-09-24 21:41 dalias Name => Rich Felker
2012-09-24 21:41 dalias Organization => musl libc
2012-09-24 21:41 dalias Section => pthread_cleanup_push
2012-09-24 21:41 dalias Page Number => unknown
2012-09-24 21:41 dalias Line Number => unknown


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker