The following issue has been UPDATED.
======================================================================
http://austingroupbugs.net/view.php?id=109
======================================================================
Reported By: msbrown
Assigned To: ajosey
======================================================================
Project: 1003.1(2008)/Issue 7
Issue ID: 109
Category: System Interfaces
Type: Error
Severity: Editorial
Priority: normal
Status: Interpretation Required
Name: Mark Brown
Organization: IBM
User Reference:
Section: 2.9.1
Page Number: 507
Line Number: 17490
Final Accepted Text: http://austingroupbugs.net/view.php?id=109#c142
======================================================================
Date Submitted: 2009-06-30 19:26 UTC
Last Modified: 2009-06-30 19:27 UTC
======================================================================
Summary: mblen() not thread-safe
Description:
_____________________________________________________________________________
EDITORIAL Enhancement Request
Number 38
msebor:xxxxxxxxx Bug in XSHd5.1 2.9.1 (rdvk#
4)
{mblen() not thread-safe} Wed, 20 May 2009 00:22:48 +0100
(BST)
_____________________________________________________________________________
mblen() and mbtowc() are expected to maintain an internal shift state
from one call to the next. However, neither function is listed in
2.9.1, Thread-Safety, among functions that are not required to be
thread-safe. Thus, the specification effectively requires that each
function maintain a thread-local copy of the state. However, at least
two recent quality implementations maintain a per-process state
instead, and thus are not thread-safe. A discussion on austin-group-l
indicates that the named functions are not, in fact, intended to be
thread-safe.
Desired Action:
Add mblen() and mbtowc() functions that maintain an internal state
to the list of functions that are not required to be thread safe,
in 2.9.1, Thread-Safety.
======================================================================
----------------------------------------------------------------------
(0000142) msbrown (manager) - 2009-06-30 19:27
http://austingroupbugs.net/view.php?id=109#c142
----------------------------------------------------------------------
->interps
Send this down the interpretations track with the normal
boilerplate for "standard is clear; standard is wrong".
Concerns are being forwarded to the sponsor.
Proposed changes for a future revision/
Add mblen(), mbstowcs(), and mbtowc() in subclause 2.9.1 in alphabetic
order to the list of functions that need not be thread-safe in the table
on P507, L17490-17510.
Change the list of functions that need not be thread-safe if called with
a NULL ps argument in subclause 2.9.1 on P507, L17512 from:
"wcrtomb() and wcsrtombs()"
to:
"mbrlen(), mbrtowc(), mbsnrtowcs(), mbsrtowcs(), wcrtomb(),
wcsnrtombs(), and wcsrtombs()"
Add a new paragraph to the mblen() DESCRIPTION after P1270, L41765:
"The mblen() function need not be thread-safe."
with CX shading.
Add a new paragraph to the mbrlen() DESCRIPTION after P1272, L41808:
"The mbrlen() function need not be thread-safe if called with a
NULL ps argument."
with CX shading.
Add a new paragraph to the mbrtowc() DESCRIPTION after P1274, L41871:
"The mbrtowc() function need not be thread-safe if called with a
NULL ps argument."
with CX shading.
Add a new paragraph to the mbsnrtowcs() and mbsrtowcs() DESCRIPTION
after P1277, L41989:
"The mbsnrtowcs() and mbsrtowcs() functions need not be
thread-safe if called with a NULL ps argument."
with CX shading.
Add a new paragraph to the mbtowc() DESCRIPTION after P1281, L42094:
"The mbtowc() function need not be thread-safe."
with CX shading.
Change:
"The wcsrtombs() function"
in the DESCRIPTION of wcsnrtombs() and wcsrtombs() on P2219, L69818 to:
"The wcsnrtombs() and wcsrtombs() functions"
keeping the CX shading.
Remove wcstombs() from the current table of non thread safe functions
On page 2235 remove line 70283 "need not be thread-safe"
|