Anonymous | Login | 2024-09-07 15:21 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 | ||
0000448 | [1003.1(2008)/Issue 7] System Interfaces | Objection | Omission | 2011-05-19 20:49 | 2024-06-11 08:53 | ||
Reporter | eblake | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted | ||||
Status | Closed | ||||||
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 input. 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. to: 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 | |||||||
|
There are no notes attached to this issue. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |