Anonymous | Login | 2025-01-22 17:34 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000826 | [1003.1(2013)/Issue7+TC1] System Interfaces | Objection | Omission | 2014-02-12 15:07 | 2019-06-10 08:54 | ||
Reporter | geoffclare | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted | ||||
Status | Closed | ||||||
Name | Geoff Clare | ||||||
Organization | The Open Group | ||||||
User Reference | |||||||
Section | 2.9.1 | ||||||
Page Number | 512 | ||||||
Line Number | 17626 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000826: setlocale() should not be required to be thread-safe | ||||||
Description |
Since setlocale() is one of the functions that returns internal data that can be overwritten by a subsequent call, it should have been included in the list of functions that need not be thread-safe, along with all the other such functions, when threads were first added to POSIX, but somehow it was omitted. It's possible that some implementations are using a per-thread internal buffer in order to make setlocale() thread-safe, but C11 does not require this (it says "A call to the setlocale function may introduce a data race with other calls to the setlocale function"), so POSIX should not require it either. Also, since setlocale() is not in the list in 2.9.1 it was overlooked by 0000656. Rather than reopen that bug to add it, the relevant change is included here. |
||||||
Desired Action |
At page 512 line 17626 section 2.9.1 add setlocale() to the list of functions that need not be thread-safe. At page 1884 line 60595 section setlocale() add a new paragraph to the end of the DESCRIPTION: [CX]The setlocale() function need not be thread-safe.[/CX] At page 1884 line 60604 section setlocale() after: [CX]The returned string pointer might be invalidated or[/CX] the string content might be overwritten by a subsequent call to setlocale(). add: [CX]The returned pointer might also be invalidated if the calling thread is terminated.[/CX] |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
![]() |
||||||
|
There are no notes attached to this issue. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |