Bug#47684: vsnprintf broken in libc6 (powerppc)
Package: libc6
Version: 2.1.2-5
I get SIGSEGVs at the vsnprintf call in the following code
segment (this is from dump-0.4, on powerpc):
void
#ifdef __STDC__
msg(const char *fmt, ...)
#else
msg(fmt, va_alist)
char *fmt;
va_dcl
#ifdef __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
(void) vfprintf(stderr, fmt, ap);
(void) fflush(stdout);
(void) fflush(stderr);
(void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap);
va_end(ap);
}
The call to vfprintf just before is ok. Using libc_debug I get:
(gdb) run -f nada /usr/local
Starting program: /root/dump-0.4b7/dump/dump -f nada /usr/local
DUMP: pid=1513 Looking for name /dev/hda8 in dumpdates = /etc/dumpdates for level = 0
Program received signal SIGSEGV, Segmentation fault.
0xfef2c20 in strlen () at soinit.c:59
59 soinit.c: No such file or directory.
(gdb) where
#0 0xfef2c20 in strlen () at soinit.c:59
#1 0xfed736c in vfprintf () at vfprintf.c:1565
#2 0xfee6a8c in _IO_vsnprintf (string=0x1001e508 "Looking for name ",
maxlen=8192,
format=0x1000bc50 "Looking for name %s in dumpdates = %s for level = %c\n", args=0x7fffe940) at vsnprintf.c:129
#3 0x10004dec in msg (
fmt=0x1000bc50 "Looking for name %s in dumpdates = %s for level = %c\n")
at optr.c:368
#4 0x10001ca8 in getdumptime (createdumpdates=0) at itime.c:169
#5 0x10002ef4 in main (argc=0, argv=0x7ffffcb4) at main.c:396
(gdb) quit
This is probably related to bug #22541.
Nuno.
Reply to: