Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 1997 10:52:29 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@freefall.freebsd.org, Shimon@i-Connect.Net
Subject:   Re: bin/2633: fsck -p in /etc/rc fails with cannot alloc nnnn by
Message-ID:  <199702052352.KAA26426@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
> Have you considered looking at the fact that fsck may be doing lseek or
> some other computation, based on the SIZE of the partition in bytes,
> encountering an integer overflow, or sign extention problem and trying to
> malloc (for example) a negative number, or a very small one, etc.
> 
> Do we have llseek(2) in FreeBSD?

BSD4.4Lite-derived systems have 64-bit off_t's and lseek(2).

There are several overflow and sign extension bugs in plain BSD4.4Lite,
but FreeBSD has fixed many of them.  The most common bug was to do an
overflowing multiplication of a daddr_t by a block size.  fsck and many
other things didn't work for partitions >= 2GB in early versions of
FreeBSD because btodb() in <machine/param.h> overflowed on 32-bit
systems.  There are probably still bugs for files >= 2GB but I don't
know of any for file systems >= 2GB.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702052352.KAA26426>