Subject: bin/2659: disklabel dumps core trying to write certain label
To: None <gnats-bugs@NetBSD.ORG>
From: David Gilbert <dgilbert@jaywon.pci.on.ca>
List: netbsd-bugs
Date: 07/25/1996 23:14:15
>Number: 2659
>Category: bin
>Synopsis: disklabel dumps core trying to write certain label
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 25 23:50:04 1996
>Last-Modified:
>Originator: David Gilbert
>Organization:
Just me.
>Release: 1.1ish sources, kernel is newer.
>Environment:
System: NetBSD repeat 1.2_ALPHA NetBSD 1.2_ALPHA (DEBUG2) #4: Wed Jul 24 12:47:22 EDT 1996 dgilbert@repeat:/u/dgilbert/downloads/bsd960626/src/sys/arch/sparc/compile/DEBUG2 sparc
>Description:
I get the following gdb output:
[4:23:323]root@repeat:~> disklabel -R sd7 cdc.label
Segmentation fault (core dumped)
[4:24:324]root@repeat:~> gdb disklabel disklabel.core
GDB is free software and you are welcome to 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.
GDB 4.11 (sparc-netbsd), Copyright 1993 Free Software Foundation, Inc...
Core was generated by `disklabel'.
Program terminated with signal 11, Segmentation fault.
#0 0x6e34 in strcspn ()
(gdb) bt
#0 0x6e34 in strcspn ()
#1 0x4c3c in word (cp=0x0) at disklabel.c:950
#2 0x5df8 in getasciilabel (f=0x23cd0, lp=0x263c8) at disklabel.c:1193
#3 0x31ec in main (argc=2, argv=0xf7fff43c) at disklabel.c:290
(gdb)
>How-To-Repeat:
This is the disklabel (I got it from the disk):
# /dev/rsd7c:
type: SCSI
disk: SCSI disk
label: fictitious
flags:
bytes/sector: 512
sectors/track: 52
tracks/cylinder: 15
sectors/cylinder: 780
cylinders: 1632
total sectors: 1295850
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg]
a: 1295850 0 4.2BSD 0 0 # (Cyl. 0 - 688296*)
c: 1295850 0
g: 1295850 0 4.2BSD
>Fix:
I have not looked at it yet. I'm still trying to see if
changing the label itself will fix the problem.
>Audit-Trail:
>Unformatted: