Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001901 [1003.1(2024)/Issue8] System Interfaces Editorial Clarification Requested 2025-01-09 16:43 2025-01-16 16:47
Reporter dancross View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Resolved  
Name Dan Cross
Organization
User Reference
Section sigaction
Page Number 2046
Line Number 67134-67135
Interp Status ---
Final Accepted Text Note: 0007052
Summary 0001901: sigaction() incorrectly states (sig)longjmp are not in the list of async-signal-safe functions
Description The description of sigaction() currently reads, in part,

"Note that longjmp() and siglongjmp() are not in the list of async-signal-safe functions."

However, XSH 2.4.3 includes both longjmp() and siglongjmp() in the list of async-signal-safe functions (page 519, lines 18385 and 18367, respectively). Moreover, the description of longjmp() on page 1372 line 46093 explicitly states that longjmp is async-signal-safe; the paragraph started on that line goes on to discuss caveats around its use in signal handlers. Presumably this applies to siglongjmp() as well, as it is described as being equivalent to longjmp() in all respects other than those specifically documented in its description.
Desired Action The text in sigaction() should be updated to reflect that longmp() and siglongjmp() are both async-signal-safe, but must be used with caution when called from a signal handler.
Tags tc1-2024
Attached Files

- Relationships
related to 0000516Closedajosey 1003.1(2008)/Issue 7 Calling longjmp() from a signal handler 

-  Notes
(0007044)
geoffclare (manager)
2025-01-16 15:05

Looks like we missed this sigaction() APPLICATION USAGE text in bug 0000516 when we made [sig]longjmp() async-signal-safe.

Rather than updating the text with full details, it may be preferable to avoid duplication by keeping it short and having it reference the longjmp() page for the details.
(0007052)
geoffclare (manager)
2025-01-16 16:45

On page 2046 line 67134 section sigaction(), change:
Note that longjmp() and siglongjmp() are not in the list of async-signal-safe functions. This is because the code executing after longjmp() and siglongjmp() can call any unsafe functions with the same danger as calling those unsafe functions directly from the signal handler. Applications that use longjmp() and siglongjmp() from within signal handlers require rigorous protection in order to be portable.

to:
Note that although longjmp() and siglongjmp() are in the list of async-signal-safe functions, it is recommended that applications do not call them from signal handlers. See the DESCRIPTION and APPLICATION USAGE for [xref to longjmp()].

- Issue History
Date Modified Username Field Change
2025-01-09 16:43 dancross New Issue
2025-01-09 16:43 dancross Name => Dan Cross
2025-01-09 16:43 dancross Section => sigaction
2025-01-09 16:43 dancross Page Number => 2046
2025-01-09 16:43 dancross Line Number => 67134-67135
2025-01-16 15:05 geoffclare Note Added: 0007044
2025-01-16 15:06 geoffclare Relationship added related to 0000516
2025-01-16 16:45 geoffclare Note Added: 0007052
2025-01-16 16:47 geoffclare Interp Status => ---
2025-01-16 16:47 geoffclare Final Accepted Text => Note: 0007052
2025-01-16 16:47 geoffclare Status New => Resolved
2025-01-16 16:47 geoffclare Resolution Open => Accepted As Marked
2025-01-16 16:47 geoffclare Tag Attached: tc1-2024


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