Discussion:
[1003.1(2013)/Issue7+TC1 0000863]: Explicitly disallow longjmp from pthread_once init_routine
Austin Group Bug Tracker
2014-10-07 13:35:52 UTC
Permalink
A NOTE has been added to this issue.
======================================================================
http://austingroupbugs.net/view.php?id=863
======================================================================
Reported By: dalias
Assigned To:
======================================================================
Project: 1003.1(2013)/Issue7+TC1
Issue ID: 863
Category: System Interfaces
Type: Clarification Requested
Severity: Editorial
Priority: normal
Status: Resolved
Name: Rich Felker
Organization: musl libc
User Reference:
Section: pthread_once
Page Number: 1684
Line Number: 54499
Interp Status: ---
Final Accepted Text: See
http://austingroupbugs.net/view.php?id=863#c2371.
Resolution: Accepted As Marked
Fixed in Version:
======================================================================
Date Submitted: 2014-08-05 22:09 UTC
Last Modified: 2014-10-07 13:35 UTC
======================================================================
Summary: Explicitly disallow longjmp from pthread_once
init_routine
======================================================================

----------------------------------------------------------------------
(0002409) dalias (reporter) - 2014-10-07 13:35
http://austingroupbugs.net/view.php?id=863#c2409
----------------------------------------------------------------------
I found a related issue: in XBD 4.11 Memory Synchronization,

"The pthread_once() function shall synchronize memory for the first call in
each thread for a given pthread_once_t object."

The limitation to "the first call" seems to be assuming that init_routine
has completed after the first call. However, it's plausible that the first
call to init_routine acts on cancellation, and that pthread_once is called
again with the same pthread_once_t object via cancellation cleanup
handlers. In this case, a second call to pthread_once also needs to
synchronize, I think.

Should I open this as a separate issue?

Issue History
Date Modified Username Field Change
======================================================================
2014-08-05 22:09 dalias New Issue
2014-08-05 22:09 dalias Name => Rich Felker
2014-08-05 22:09 dalias Organization => musl libc
2014-08-05 22:09 dalias Section => pthread_once
2014-08-05 22:09 dalias Page Number => unknown
2014-08-05 22:09 dalias Line Number => unknown
2014-08-06 01:24 dalias Note Added: 0002333
2014-08-08 11:01 jilles Note Added: 0002339
2014-08-08 13:21 steffen Note Added: 0002341
2014-08-08 16:05 dalias Note Added: 0002342
2014-08-08 18:29 steffen Note Added: 0002344
2014-08-28 15:37 Don Cragun Note Added: 0002366
2014-08-28 16:14 Don Cragun Note Edited: 0002366
2014-08-28 16:16 Don Cragun Note Edited: 0002366
2014-08-28 16:17 Don Cragun Page Number unknown => 1684
2014-08-28 16:17 Don Cragun Line Number unknown => 54499
2014-08-28 16:17 Don Cragun Interp Status => ---
2014-08-28 16:17 Don Cragun Final Accepted Text => See
http://austingroupbugs.net/view.php?id=863#c2366.
2014-08-28 16:17 Don Cragun Status New => Resolved
2014-08-28 16:17 Don Cragun Resolution Open => Accepted As
Marked
2014-08-28 16:23 Don Cragun Note Edited: 0002366
2014-08-28 16:23 Don Cragun Tag Attached: tc2-2008
2014-08-28 16:41 dalias Note Added: 0002367
2014-08-28 17:13 mdempsky Note Added: 0002368
2014-08-28 17:55 dalias Note Added: 0002369
2014-08-28 23:27 mdempsky Note Added: 0002370
2014-09-04 15:08 nick Resolution Accepted As Marked =>
Reopened
2014-09-04 15:36 Don Cragun Note Added: 0002371
2014-09-04 15:36 Don Cragun Note Edited: 0002371
2014-09-04 15:49 Don Cragun Note Edited: 0002371
2014-09-04 15:50 Don Cragun Final Accepted Text See
http://austingroupbugs.net/view.php?id=863#c2366. => See
http://austingroupbugs.net/view.php?id=863#c2371.
2014-09-04 15:50 Don Cragun Resolution Reopened => Accepted As
Marked
2014-10-07 13:35 dalias Note Added: 0002409
======================================================================
Loading...