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
0000448 [1003.1(2008)/Issue 7] System Interfaces Objection Omission 2011-05-19 20:49 2020-03-03 15:03
Reporter eblake View Status public  
Assigned To ajosey
Priority normal Resolution Accepted  
Status Applied  
Name Eric Blake
Organization Red Hat
User Reference ebb.memccpy
Section memccpy
Page Number 1283
Line Number 42136
Interp Status ---
Final Accepted Text See Desired Action
Summary 0000448: Simple memory manipulation should not corrupt errno
Description The standard is clear that any successful function call may change the value
of errno unless explicitly specified otherwise. However, for most memory
manipulation functions in <string.h> (and <wchar.h>), no implementation
modifies errno, and making this requirement explicit will make it easier
for applications to copy or otherwise manipulate error messages collected
from strerror( ) and friends without having to worry about losing the state
of errno.

The wording chosen here still permits implementations to set errno to EFAULT
if they choose to diagnose invalid pointers.
Desired Action In the DESCRIPTION of each of the following interfaces that are documented
as having no errors, add the following paragraph, with FUNCTION replaced
with the appropriate name(s), and with CX shading if the function is also
documented in the C standard:

The FUNCTION( ) function shall not change the setting of errno on valid

42133 memccpy
42164 memchr CX
42195 memcmp CX
42223 memcpy CX
42254 memmove CX
42281 memset CX
62862 strcat CX
62893 strchr CX
62926 strcmp CX
63060 strcpy, stpcpy CX
63147 strcspn CX
63887 strlen, strnlen CX
63954 strncat CX
63987 strncmp CX
64023 strncpy, stpncpy CX
64078 strpbrk CX
64306 strrchr CX
64382 strspn CX
64416 strstr CX
64667 strtok, strtok_r CX
69264 wcscat CX
69298 wcschr CX
69331 wcscmp CX
69415 wcscpy, wcpcpy CX
69452 wcscspn CX
69565 wcslen, wcsnlen CX
69613 wcsncat CX
69646 wcsncmp CX
69684 wcsncpy, wcpncpy CX
69736 wcspbrk CX
69767 wcsrchr CX
69871 wcsspn CX
69905 wcsstr CX
70130 wcstok CX
70422 wcswidth
70525 wctob CX
70714 wcwidth
70753 wmemchr CX
70789 wmemcmp CX
70827 wmemcpy CX
70867 wmemmove CX
70902 wmemset CX

At line 62817 [strcasecmp], change

When the LC_CTYPE category of the current locale is from the POSIX locale,
strcasecmp( ) and strncasecmp( ) shall behave as if the strings had been
converted to lowercase and then a byte comparison performed. Otherwise,
the results are unspecified.


When the LC_CTYPE category of the selected locale is from the POSIX locale,
these functions shall behave as if the strings had been converted to
lowercase and then a byte comparison performed, and errno shall not be
changed on valid input. Otherwise, the results are unspecified.
Tags issue8
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-05-19 20:49 eblake New Issue
2011-05-19 20:49 eblake Status New => Under Review
2011-05-19 20:49 eblake Assigned To => ajosey
2011-05-19 20:49 eblake Name => Eric Blake
2011-05-19 20:49 eblake Organization => Red Hat
2011-05-19 20:49 eblake User Reference => ebb.memccpy
2011-05-19 20:49 eblake Section => memccpy
2011-05-19 20:49 eblake Page Number => 1283
2011-05-19 20:49 eblake Line Number => 42136
2011-05-19 20:49 eblake Interp Status => ---
2011-06-09 15:58 msbrown Tag Attached: issue8
2011-06-09 15:58 msbrown Resolution Open => Future Enhancement
2011-06-23 16:23 eblake Desired Action Updated
2011-06-23 16:26 nick Final Accepted Text => See Desired Action
2011-06-23 16:26 nick Status Under Review => Resolved
2011-06-23 16:26 nick Resolution Future Enhancement => Accepted
2020-03-03 15:03 geoffclare Status Resolved => Applied

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