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
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


    [CX]The returned pointer might also be invalidated if the calling
    thread is terminated.[/CX]
Tags tc2-2008
Attached Files

- Relationships
related to 0000656Closedajosey Clearly allow or forbid thread-local storage for "static" buffers 

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-02-12 15:07 geoffclare New Issue
2014-02-12 15:07 geoffclare Name => Geoff Clare
2014-02-12 15:07 geoffclare Organization => The Open Group
2014-02-12 15:07 geoffclare Section => 2.9.1
2014-02-12 15:07 geoffclare Page Number => 512
2014-02-12 15:07 geoffclare Line Number => 17626
2014-02-12 15:07 geoffclare Interp Status => ---
2014-02-12 15:07 geoffclare Relationship added related to 0000656
2014-03-20 15:50 Don Cragun Status New => Resolved
2014-03-20 15:50 Don Cragun Resolution Open => Accepted
2014-03-20 15:51 Don Cragun Tag Attached: tc2-2008
2019-06-10 08:54 agadmin Status Resolved => Closed

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