This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5532] New: Not clear behaviour of function strerror_r
- From: "ylalym at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 2 Jan 2008 14:44:20 -0000
- Subject: [Bug libc/5532] New: Not clear behaviour of function strerror_r
- Reply-to: sourceware-bugzilla at sourceware dot org
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.