[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#422598: libc6: Segmentation fault in printf()/vfprintf()/strlen()

Package: libc6
Version: 2.5-6
Severity: normal


there happens a segmentation fault with the following code:

	#include <stdio.h>

	int main(int argc, char**argv)
		printf("%s\n", strerror(atoi(argv[1])));

I have observed this on amd64 libc6 2.5-5 and 2.5-6,
it does not occur on i386 libc6 2.5-5.

The amd64 system is actually an amd64 schroot running on a sarge/i386

If there is anything I can do to help you debug this, please let me
know. A small test log is appended below.


$ vi strerror.c
$ gcc -g -o strerror strerror.c
$ ./strerror 0 ; echo $?
Segmentation fault
$ gdb ./strerror
GNU gdb 6.6-debian
This GDB was configured as "x86_64-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) set args 0
(gdb) run
Starting program: /home/beckmann/strerror 0

Program received signal SIGSEGV, Segmentation fault.
0x00002ad8f39eeab0 in strlen () from /lib/libc.so.6
(gdb) bt full
#0  0x00002ad8f39eeab0 in strlen () from /lib/libc.so.6
No symbol table info available.
#1  0x00002ad8f39beb15 in vfprintf () from /lib/libc.so.6
No symbol table info available.
#2  0x00002ad8f39c4a6a in printf () from /lib/libc.so.6
No symbol table info available.
#3  0x0000000000400549 in main (argc=2, argv=0x7fffff9b5838) at
No locals.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (30, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux (SMP w/16 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

-- no debconf information

Reply to: