Date: Tue, 8 Sep 1998 19:24:09 +0000 From: dmaddox@scsn.net (Donald J. Maddox) To: current@FreeBSD.ORG Subject: Coredumping vmstat Message-ID: <19980908192409.A1858@scsn.net>
next in thread | raw e-mail | index | archive | help
Vmstat, iostat (and maybe others) are coredumping when compiled ELF (others have reported that they work ok when aout)... The problem in vmstat occurs at line 361: for (i = 0; i < dk_ndrive && ndrives < 4; i++) { if (dr_select[i]) continue; for (cp = defdrives; *cp; cp++) if (strcmp(dr_name[i], *cp) == 0) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dr_select[i] = 1; ++ndrives; break; This code apparently expects *cp to be 0 at the end of the 'defdrives' list, but instead it gets 0xffffffff, and this causes a bus error. >From gdb: . . . 364 break; (gdb) 357 for (i = 0; i < dk_ndrive && ndrives < 4; i++) { (gdb) 358 if (dr_select[i]) (gdb) 360 for (cp = defdrives; *cp; cp++) (gdb) 361 if (strcmp(dr_name[i], *cp) == 0) { (gdb) 360 for (cp = defdrives; *cp; cp++) (gdb) 361 if (strcmp(dr_name[i], *cp) == 0) { (gdb) 360 for (cp = defdrives; *cp; cp++) (gdb) p *cp $1 = 0x804a375 "wd1" (gdb) s 361 if (strcmp(dr_name[i], *cp) == 0) { (gdb) 360 for (cp = defdrives; *cp; cp++) (gdb) p *cp $2 = 0x804a371 "sd0" (gdb) s 361 if (strcmp(dr_name[i], *cp) == 0) { (gdb) p *cp $3 = 0x804a36d "sd1" (gdb) s 360 for (cp = defdrives; *cp; cp++) (gdb) s 361 if (strcmp(dr_name[i], *cp) == 0) { (gdb) p *cp $4 = 0xffffffff <Error reading address 0xffffffff: Invalid argument> (gdb) . . . Coredump on the next step... Anybody have any idea what's going on here? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980908192409.A1858>