Discussion:
[1003.1(2008)/Issue 7 0000622]: Disallow loophole for asynchronous cancellation of any function
Austin Group Bug Tracker
2014-06-05 14:47:54 UTC
Permalink
A NOTE has been added to this issue.
======================================================================
http://austingroupbugs.net/view.php?id=622
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 622
Category: System Interfaces
Type: Omission
Severity: Objection
Priority: normal
Status: Under Review
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.9.5 Thread Cancellation
Page Number: unknown
Line Number: unknown
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2012-10-15 00:26 UTC
Last Modified: 2014-06-05 14:47 UTC
======================================================================
Summary: Disallow loophole for asynchronous cancellation of
any function
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000615 pthread_setcancelstate should be async-...
======================================================================

----------------------------------------------------------------------
(0002260) geoffclare (manager) - 2014-06-05 14:47
http://austingroupbugs.net/view.php?id=622#c2260
----------------------------------------------------------------------
The following part of the http://austingroupbugs.net/view.php?id=841 resolution
should be done in this bug
instead (so that it can be included in TC2):

At page 515 line 17840 section 2.9.5.4 Async-Cancel Safety add two
paragraphs:
<blockquote>If a thread has asynchronous cancellation enabled and is
cancelled during execution of a function that is not async-cancel-safe, the
behavior is undefined.

If a thread has deferred cancellation enabled, a signal catching function
is called in that thread during execution of a function that is not
async-cancel-safe, and the signal catching function calls any function that
is a cancellation point while a cancellation is pending for the thread,
without first disabling cancellation, the behavior is
undefined.</blockquote>

Issue History
Date Modified Username Field Change
======================================================================
2012-10-15 00:26 dalias New Issue
2012-10-15 00:26 dalias Status New => Under Review
2012-10-15 00:26 dalias Assigned To => ajosey
2012-10-15 00:26 dalias Name => Rich Felker
2012-10-15 00:26 dalias Organization => musl libc
2012-10-15 00:26 dalias Section => XSH 2.9.5 Thread
Cancellation
2012-10-15 00:26 dalias Page Number => unknown
2012-10-15 00:26 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000615
2013-05-02 15:40 msbrown Interp Status => ---
2013-05-02 15:40 msbrown Summary Disallow loophope for
asynchronous cancellation of any function => Disallow loophole for asynchronous
cancellation of any function
2014-06-05 14:47 geoffclare Note Added: 0002260
======================================================================
Austin Group Bug Tracker
2014-06-05 14:48:39 UTC
Permalink
The following issue has been set as RELATED TO issue 0000841.
======================================================================
http://austingroupbugs.net/view.php?id=622
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 622
Category: System Interfaces
Type: Omission
Severity: Objection
Priority: normal
Status: Under Review
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.9.5 Thread Cancellation
Page Number: unknown
Line Number: unknown
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2012-10-15 00:26 UTC
Last Modified: 2014-06-05 14:48 UTC
======================================================================
Summary: Disallow loophole for asynchronous cancellation of
any function
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000841 pthread_setcancelstate should be async-...
related to 0000615 pthread_setcancelstate should be async-...
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2012-10-15 00:26 dalias New Issue
2012-10-15 00:26 dalias Status New => Under Review
2012-10-15 00:26 dalias Assigned To => ajosey
2012-10-15 00:26 dalias Name => Rich Felker
2012-10-15 00:26 dalias Organization => musl libc
2012-10-15 00:26 dalias Section => XSH 2.9.5 Thread
Cancellation
2012-10-15 00:26 dalias Page Number => unknown
2012-10-15 00:26 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000615
2013-05-02 15:40 msbrown Interp Status => ---
2013-05-02 15:40 msbrown Summary Disallow loophope for
asynchronous cancellation of any function => Disallow loophole for asynchronous
cancellation of any function
2014-06-05 14:47 geoffclare Note Added: 0002260
2014-06-05 14:48 geoffclare Relationship added related to 0000841
======================================================================
Austin Group Bug Tracker
2014-06-05 15:46:11 UTC
Permalink
A NOTE has been added to this issue.
======================================================================
http://austingroupbugs.net/view.php?id=622
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 622
Category: System Interfaces
Type: Omission
Severity: Objection
Priority: normal
Status: Under Review
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.9.5 Thread Cancellation
Page Number: unknown
Line Number: unknown
Interp Status: ---
Final Accepted Text:
======================================================================
Date Submitted: 2012-10-15 00:26 UTC
Last Modified: 2014-06-05 15:46 UTC
======================================================================
Summary: Disallow loophole for asynchronous cancellation of
any function
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000841 pthread_setcancelstate should be async-...
related to 0000615 pthread_setcancelstate should be async-...
======================================================================

----------------------------------------------------------------------
(0002261) Don Cragun (manager) - 2014-06-05 15:46
http://austingroupbugs.net/view.php?id=622#c2261
----------------------------------------------------------------------
At page 515 line 17840 section 2.9.5.4 Async-Cancel Safety add two
paragraphs:
<blockquote>
If a thread has asynchronous cancellation enabled and is cancelled during
execution of a function that is not async-cancel-safe, the behavior is
undefined.

If a thread has deferred cancellation enabled, a signal catching function
is called in that thread during execution of a function that is not
async-cancel-safe, and the signal catching function calls any function that
is a cancellation point while a cancellation is pending for the thread, the
behavior is undefined.
</blockquote>
Change "None." at page 1694, line 54327 section APPLICATION USAGE in
pthread_setcancelstate() to:
<blockquote>
In order to write a signal handler for an asynchronous signal which can run
safely in a cancellable thread, pthread_setcancelstate() must be used to
disable cancellation for the duration of any calls that the signal handler
makes which are cancellation points. However, the standard does not permit
strictly conforming applications to call pthread_setcancelstate() from a
signal handler since it is not currently required to be async-signal-safe.
On implementations where pthread_setcancelstate() is not async-signal-safe,
alternatives are to ensure either that the corresponding signals are
blocked during execution of functions that are not async-cancel-safe or
that cancellation is disabled during times when those signals could be
delivered. Implementations are strongly encouraged to make
pthread_setcancelstate() async-signal-safe.
</blockquote>

Issue History
Date Modified Username Field Change
======================================================================
2012-10-15 00:26 dalias New Issue
2012-10-15 00:26 dalias Status New => Under Review
2012-10-15 00:26 dalias Assigned To => ajosey
2012-10-15 00:26 dalias Name => Rich Felker
2012-10-15 00:26 dalias Organization => musl libc
2012-10-15 00:26 dalias Section => XSH 2.9.5 Thread
Cancellation
2012-10-15 00:26 dalias Page Number => unknown
2012-10-15 00:26 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000615
2013-05-02 15:40 msbrown Interp Status => ---
2013-05-02 15:40 msbrown Summary Disallow loophope for
asynchronous cancellation of any function => Disallow loophole for asynchronous
cancellation of any function
2014-06-05 14:47 geoffclare Note Added: 0002260
2014-06-05 14:48 geoffclare Relationship added related to 0000841
2014-06-05 14:50 geoffclare Note Edited: 0002260
2014-06-05 15:46 Don Cragun Note Added: 0002261
======================================================================
Austin Group Bug Tracker
2014-06-05 15:49:54 UTC
Permalink
The following issue has been RESOLVED.
======================================================================
http://austingroupbugs.net/view.php?id=622
======================================================================
Reported By: dalias
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 622
Category: System Interfaces
Type: Omission
Severity: Objection
Priority: normal
Status: Resolved
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.9.5 Thread Cancellation
Page Number: 295
Line Number: 17659-17673
Interp Status: ---
Final Accepted Text: See
http://austingroupbugs.net/view.php?id=622#c2261.
Resolution: Accepted As Marked
Fixed in Version:
======================================================================
Date Submitted: 2012-10-15 00:26 UTC
Last Modified: 2014-06-05 15:49 UTC
======================================================================
Summary: Disallow loophole for asynchronous cancellation of
any function
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000841 pthread_setcancelstate should be async-...
related to 0000615 pthread_setcancelstate should be async-...
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2012-10-15 00:26 dalias New Issue
2012-10-15 00:26 dalias Status New => Under Review
2012-10-15 00:26 dalias Assigned To => ajosey
2012-10-15 00:26 dalias Name => Rich Felker
2012-10-15 00:26 dalias Organization => musl libc
2012-10-15 00:26 dalias Section => XSH 2.9.5 Thread
Cancellation
2012-10-15 00:26 dalias Page Number => unknown
2012-10-15 00:26 dalias Line Number => unknown
2013-04-25 16:19 Don Cragun Relationship added related to 0000615
2013-05-02 15:40 msbrown Interp Status => ---
2013-05-02 15:40 msbrown Summary Disallow loophope for
asynchronous cancellation of any function => Disallow loophole for asynchronous
cancellation of any function
2014-06-05 14:47 geoffclare Note Added: 0002260
2014-06-05 14:48 geoffclare Relationship added related to 0000841
2014-06-05 14:50 geoffclare Note Edited: 0002260
2014-06-05 15:46 Don Cragun Note Added: 0002261
2014-06-05 15:49 Don Cragun Page Number unknown => 295
2014-06-05 15:49 Don Cragun Line Number unknown => 17659-17673
2014-06-05 15:49 Don Cragun Final Accepted Text => See
http://austingroupbugs.net/view.php?id=622#c2261.
2014-06-05 15:49 Don Cragun Status Under Review =>
Resolved
2014-06-05 15:49 Don Cragun Resolution Open => Accepted As
Marked
======================================================================
Loading...