[Bug libc/5532] New: Not clear behaviour of function strerror_r
ylalym at gmail dot com
sourceware-bugzilla@sourceware.org
Wed Jan 2 14:46:00 GMT 2008
Program:
#define _REENTRANT
#include <string.h>
#include <stdio.h>
int main()
{
char s[1024];
strerror_r(1, s, 1024);
printf("\ns = \"%s\" len = %d\n\n", s, strlen(s));
return 0;
}
Save this program as a.c and a.cpp
> gcc a.c
> ./a.out
s = "Operation not permitted" len = 23
> g++ a.cpp
> ./a.out
s = "���÷P÷hÃÂ�Y���" len = 21
> icpc a.cpp
> ./a.out
s = "@���D���" len = 8
--
Summary: Not clear behaviour of function strerror_r
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: ylalym at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5532
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Glibc-bugs
mailing list