Discussion:
[1003.1(2008)/Issue 7 0000841]: pthread_setcancelstate should be async-signal-safe
Austin Group Bug Tracker
2014-06-05 14:48:40 UTC
Permalink
The following issue has been set as RELATED TO issue 0000622.
======================================================================
http://austingroupbugs.net/view.php?id=841
======================================================================
Reported By: nick
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 841
Category: System Interfaces
Type: Enhancement Request
Severity: Objection
Priority: normal
Status: Resolved
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.4.3 Signal Actions
Page Number: 489
Line Number: 16722-16755
Interp Status: ---
Final Accepted Text:
Resolution: Accepted
Fixed in Version:
======================================================================
Date Submitted: 2014-05-29 16:25 UTC
Last Modified: 2014-05-30 08:36 UTC
======================================================================
Summary: pthread_setcancelstate should be async-signal-safe
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000622 Disallow loophole for asynchronous canc...
child of 0000615 pthread_setcancelstate should be async-...
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2014-05-29 16:25 nick New Issue
2014-05-29 16:25 nick Status New => Under Review
2014-05-29 16:25 nick Assigned To => ajosey
2014-05-29 16:25 nick Name => Rich Felker
2014-05-29 16:25 nick Organization => musl libc
2014-05-29 16:25 nick Section => XSH 2.4.3 Signal
Actions
2014-05-29 16:25 nick Page Number => 489
2014-05-29 16:25 nick Line Number => 16722-16755
2014-05-29 16:25 nick Interp Status => ---
2014-05-29 16:25 nick Issue generated from 0000615
2014-05-29 16:25 nick Relationship added child of 0000615
2014-05-29 16:27 nick Tag Attached: issue8
2014-05-29 16:27 nick Resolution Open => Accepted
2014-05-29 16:28 nick Status Under Review =>
Resolved
2014-05-29 16:31 nick Desired Action Updated
2014-05-29 16:32 nick Desired Action Updated
2014-05-30 08:36 geoffclare Note Added: 0002255
2014-05-30 08:36 geoffclare Desired Action Updated
2014-06-05 14:48 geoffclare Relationship added related to 0000622
======================================================================
Austin Group Bug Tracker
2014-06-05 15:46:59 UTC
Permalink
A NOTE has been added to this issue.
======================================================================
http://austingroupbugs.net/view.php?id=841
======================================================================
Reported By: nick
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 841
Category: System Interfaces
Type: Enhancement Request
Severity: Objection
Priority: normal
Status: Resolved
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.4.3 Signal Actions
Page Number: 489
Line Number: 16722-16755
Interp Status: ---
Final Accepted Text:
Resolution: Accepted
Fixed in Version:
======================================================================
Date Submitted: 2014-05-29 16:25 UTC
Last Modified: 2014-06-05 15:46 UTC
======================================================================
Summary: pthread_setcancelstate should be async-signal-safe
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000622 Disallow loophole for asynchronous canc...
child of 0000615 pthread_setcancelstate should be async-...
======================================================================

----------------------------------------------------------------------
(0002262) nick (manager) - 2014-06-05 15:46
http://austingroupbugs.net/view.php?id=841#c2262
----------------------------------------------------------------------
After applying the changes from http://austingroupbugs.net/view.php?id=622, at
page 515 line 17840 section
2.9.5.4 Async-Cancel Safety, change:
<blockquote>
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>
to:
<blockquote>
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>
After applying the changes from http://austingroupbugs.net/view.php?id=622, at
page 1694 line 54327
(pthread_setcancelstate() application usage), change:
<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>
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, earlier versions of the
standard did not permit strictly conforming applications to call
pthread_setcancelstate() from a signal handler since it was not required to
be async-signal-safe. On non-conforming 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.
</blockquote>
(keep first sentence, change second and third sentences, delete fourth
sentence).

Issue History
Date Modified Username Field Change
======================================================================
2014-05-29 16:25 nick New Issue
2014-05-29 16:25 nick Status New => Under Review
2014-05-29 16:25 nick Assigned To => ajosey
2014-05-29 16:25 nick Name => Rich Felker
2014-05-29 16:25 nick Organization => musl libc
2014-05-29 16:25 nick Section => XSH 2.4.3 Signal
Actions
2014-05-29 16:25 nick Page Number => 489
2014-05-29 16:25 nick Line Number => 16722-16755
2014-05-29 16:25 nick Interp Status => ---
2014-05-29 16:25 nick Issue generated from 0000615
2014-05-29 16:25 nick Relationship added child of 0000615
2014-05-29 16:27 nick Tag Attached: issue8
2014-05-29 16:27 nick Resolution Open => Accepted
2014-05-29 16:28 nick Status Under Review =>
Resolved
2014-05-29 16:31 nick Desired Action Updated
2014-05-29 16:32 nick Desired Action Updated
2014-05-30 08:36 geoffclare Note Added: 0002255
2014-05-30 08:36 geoffclare Desired Action Updated
2014-06-05 14:48 geoffclare Relationship added related to 0000622
2014-06-05 15:46 nick Note Added: 0002262
======================================================================
Austin Group Bug Tracker
2014-06-05 15:48:03 UTC
Permalink
The following issue has been UPDATED.
======================================================================
http://austingroupbugs.net/view.php?id=841
======================================================================
Reported By: nick
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 841
Category: System Interfaces
Type: Enhancement Request
Severity: Objection
Priority: normal
Status: Resolved
Name: Rich Felker
Organization: musl libc
User Reference:
Section: XSH 2.4.3 Signal Actions
Page Number: 489
Line Number: 16722-16755
Interp Status: ---
Final Accepted Text: see http://austingroupbugs.net/view.php?id=841#c2262

Resolution: Accepted As Marked
Fixed in Version:
======================================================================
Date Submitted: 2014-05-29 16:25 UTC
Last Modified: 2014-06-05 15:48 UTC
======================================================================
Summary: pthread_setcancelstate should be async-signal-safe
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000622 Disallow loophole for asynchronous canc...
child of 0000615 pthread_setcancelstate should be async-...
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2014-05-29 16:25 nick New Issue
2014-05-29 16:25 nick Status New => Under Review
2014-05-29 16:25 nick Assigned To => ajosey
2014-05-29 16:25 nick Name => Rich Felker
2014-05-29 16:25 nick Organization => musl libc
2014-05-29 16:25 nick Section => XSH 2.4.3 Signal
Actions
2014-05-29 16:25 nick Page Number => 489
2014-05-29 16:25 nick Line Number => 16722-16755
2014-05-29 16:25 nick Interp Status => ---
2014-05-29 16:25 nick Issue generated from 0000615
2014-05-29 16:25 nick Relationship added child of 0000615
2014-05-29 16:27 nick Tag Attached: issue8
2014-05-29 16:27 nick Resolution Open => Accepted
2014-05-29 16:28 nick Status Under Review =>
Resolved
2014-05-29 16:31 nick Desired Action Updated
2014-05-29 16:32 nick Desired Action Updated
2014-05-30 08:36 geoffclare Note Added: 0002255
2014-05-30 08:36 geoffclare Desired Action Updated
2014-06-05 14:48 geoffclare Relationship added related to 0000622
2014-06-05 15:46 nick Note Added: 0002262
2014-06-05 15:48 nick Final Accepted Text => see
http://austingroupbugs.net/view.php?id=841#c2262
2014-06-05 15:48 nick Resolution Accepted => Accepted As
Marked
======================================================================
Loading...