Subject: bin/26595: fdisk geometory translation failure
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hatano@sarasarado.org>
List: netbsd-bugs
Date: 08/09/2004 01:02:30
>Number:         26595
>Category:       bin
>Synopsis:       fdisk geometory translation failure
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 08 16:03:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     HATANO Hiromichi
>Release:        NetBSD 2.0_BETA
>Organization:
>Environment:
System: NetBSD basha.sarasarado.org 2.0_BETA NetBSD 2.0_BETA (COBALT) #0: Wed Aug 4 09:14:09 JST 2004 root@basha.sarasarado.org:/usr/src/sys/arch/cobalt/compile/COBALT cobalt
Architecture: mipsel
Machine: cobalt
indent:
fdisk:
     $NetBSD: crt0.c,v 1.16 2000/06/14 06:49:00 cgd Exp $
     $NetBSD: fdisk.c,v 1.81 2004/07/30 23:42:29 dbj Exp $
ldd:
/fdisk:
         -lutil.7 => /lib/libutil.so.7
         -lc.12 => /lib/libc.so.12
dmesg:
wd0 at atabus0 drive 0: <TOSHIBA MK1214GAP>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 11513 MB, 23392 cyl, 16 head, 63 sec, 512 bytes/sect x 23579136 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data\
 transfers)
>Description:
fdisk make core by zero div
# gdb obj/fdisk
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mipsel--netbsd"...
(gdb) r
Starting program: /var/obj/sbin/fdisk/fdisk

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00405260 in intuit_translated_geometry () at /usr/src/sbin/fdisk/fdisk.c:1392
1392                                    xsectors = a1 / (c1 * xheads + h1);
(gdb) bt
#0  0x00405260 in intuit_translated_geometry ()
    at /usr/src/sbin/fdisk/fdisk.c:1392
#1  0x00402974 in main (argc=0, argv=0x7fffeb50)
    at /usr/src/sbin/fdisk/fdisk.c:501
(gdb) p c1
$1 = 0
(gdb) p xheads
$2 = 0
(gdb) p h1
$3 = 0
(gdb) p a1
$4 = 4294967295
(gdb) p xsectors
$5 = -1
(gdb) quit
The program is running.  Exit anyway? (y or n) y
>How-To-Repeat:
fdisk always core dumped
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: