Subject: Re: bin/29972: cpio --version memory faults
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 04/14/2005 19:10:02
The following reply was made to PR bin/29972; it has been noted by GNATS.
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: bin/29972: cpio --version memory faults
Date: Thu, 14 Apr 2005 21:09:38 +0200
On Thu, Apr 14, 2005 at 03:19:00PM +0000, lantis@askarali.info wrote:
> NetBSD MEniac 2.0_BETA NetBSD 2.0_BETA (GENERIC) #0: Tue Aug 10 14:27:34 UTC 2004 autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/i386/OBJ/autobuild/netbsd-2-0/src/sys/arch/i386/compile/GENERIC i386 and NetBSD xxx 2.0.2_STABLE NetBSD 2.0.2_STABLE (LUST) #0: Tue Apr 12 12:42:31 MDT 2005 root@xxx:/usr/obj/sys/arch/i386/compile/LUST i386
> 005 root@xxx:/usr/obj/sys/arch/i386/compile/LUST i386
> >Description:
> $ cpio --version
> Memory fault (core dumped)
I also see it on a pre-3.0 branch current. When built with -g stack trace is:
(gdb) where
#0 0x4810c4ef in strncmp () from /lib/libc.so.12
#1 0x4811cfc8 in __isthreaded () from /lib/libc.so.12
#2 0x08054ca2 in getoldopt (argc=2, argv=0xbfbfe8ac,
optstring=0x8063fe0 "+abcdfiklmoprstuvzABC:E:F:H:I:LM:O:R:SVZ6",
longopts=0x8067900, idx=0x0) at getoldopt.c:63
#3 0x080562fb in cpio_options (argc=2, argv=0xbfbfe8ac) at options.c:1377
#4 0x08054e09 in options (argc=2, argv=0xbfbfe8ac) at options.c:202
#5 0x0805868c in main (argc=2, argv=0xbfbfe8ac) at pax.c:280
#6 0x0804a2c2 in ___start ()
I'm not sure the __isthreaded() here is right. getoldopt.c:63 is a call to
getopt_long().
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--