This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11571] New: getlogin_r (NULL, 0) segfaults
- From: "rjones at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 5 May 2010 16:01:24 -0000
- Subject: [Bug libc/11571] New: getlogin_r (NULL, 0) segfaults
- Reply-to: sourceware-bugzilla at sourceware dot org
#include <unistd.h>
main ()
{
getlogin_r (NULL, 0);
}
----
$ gcc -g test.c -o test
$ ./test
Segmentation fault (core dumped)
----
This seems to be a regression in glibc 2.12, since glibc 2.11.90
did not segfault under these conditions.
The stack trace is:
Program received signal SIGSEGV, Segmentation fault.
__strncpy_sse2 (s1=0x0, s2=0x7fffffffdee1 "jones", n=18446744073709551615)
at ./strncpy.c:43
43 *++s1 = c;
(gdb) bt
#0 __strncpy_sse2 (s1=0x0, s2=0x7fffffffdee1 "jones", n=18446744073709551615)
at ./strncpy.c:43
#1 0x00007ffff7b071d2 in __getlogin_r_loginuid (name=0x0, namesize=0)
at ../sysdeps/unix/sysv/linux/getlogin_r.c:84
#2 0x00007ffff7b07299 in getlogin_r (name=0x0, namesize=0)
at ../sysdeps/unix/sysv/linux/getlogin_r.c:103
#3 0x00000000004004d7 in main () at test.c:5
--
Summary: getlogin_r (NULL, 0) segfaults
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: rjones at redhat dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11571
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.