Date: Sat, 12 Oct 2002 15:21:37 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: Kris Kennaway <kris@obsecurity.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libdisk disk.c Message-ID: <20021012222137.GA95508@xor.obsecurity.org> In-Reply-To: <Pine.NEB.3.96L.1021012181035.44458D-100000@fledge.watson.org> References: <20021012220432.GA95038@xor.obsecurity.org> <Pine.NEB.3.96L.1021012181035.44458D-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Sat, Oct 12, 2002 at 06:11:51PM -0400, Robert Watson wrote:
>
> On Sat, 12 Oct 2002, Kris Kennaway wrote:
>
> > On Sat, Oct 12, 2002 at 03:01:57PM -0700, Kris Kennaway wrote:
> > > kris 2002/10/12 15:01:57 PDT
> > >
> > > Modified files:
> > > lib/libdisk disk.c
> > > Log:
> > > Zero memory after malloc. This stops sysinstall from dumping core
> > > during disk probing with malloc debugging enabled.
> >
> > I have no idea how this went for so long without being noticed.
> > sysinstall wouldn't even start with the default malloc settings.
>
> That is odd -- I use sysinstall with relative frequency for disk labeling
> and prep. I've also had a number of coworkers install -CURRENT using
> recent snapshots and they haven't run into it...
Here's the backtrace I was getting:
#0 strsep (stringp=0xbfbfdcc8, delim=0x8093e7a " ")
at /usr/src/lib/libc/string/strsep.c:67
#1 0x0806b22e in Disk_Names () at /usr/src/lib/libdisk/disk.c:522
#2 0x0804f2f2 in deviceGetAll () at /usr/src/usr.sbin/sysinstall/devices.c:439
#3 0x0805cbab in main (argc=1, argv=0xbfbff820)
at /usr/src/usr.sbin/sysinstall/main.c:128
#4 0x0804b2dc in _start (ap=0xbfbff900 "sysinstall")
at /usr/src/lib/csu/i386-elf/crt1.c:126
(gdb) frame 1
#1 0x0806b22e in Disk_Names () at /usr/src/lib/libdisk/disk.c:522
522 for (dp = disks; ((*dp = strsep(&disklist, " ")) != NULL) &&
(gdb) print disklist
$1 = 0x80d6130 "ad0", '' <repeats 197 times>...
(the character between the '' is ascii 0xd0, the character malloc
debugging uses with the 'J' flag).
I don't know why other people hadnt seen this.
Kris
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE9qKBxWry0BWjoQKURArVvAKDWfv2LJOFOHooC6mY0B1XLz2dulACdHuQL
O5g3UGR1NVqMnTMXRJVEeGg=
=W1jc
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021012222137.GA95508>
