Subject: Re: crash in fsck_ext2fs
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 01/30/2003 15:03:57
> Neat.  If you're curious, here is the stack trace:
> 
> #0  0x804e7a6 in calcsb ()
> #1  0x804dca1 in setup ()
> #2  0x804abe4 in checkfilesys ()
> #3  0x804ab0c in main ()
> #4  0x804825c in ___start ()
> 
> > OTOH you'll probably need to debug fsck_ext2fs!
> 
> Yeah, I'm wondering how much time I want to put into this.

Not too hard! calcsb() is in setup.c
The only likely divide comes from the sequence:

	lp = getdisklabel(dev, devfd);
	pp = &lp->d_partitions[*cp - 'a'];
	fs->e2fs_bsize = pp->p_fsize;
	fs->e2fs.e2fs_bcount = (pp->p_size * DEV_BSIZE) / fs->e2fs_bsize;

Which makes it look as though the fsck code implicitely
truts the disklabel!

	David

-- 
David Laight: david@l8s.co.uk