Date: Wed, 28 Jul 1999 19:16:34 -0400 (EDT) From: Thomas David Rivers <rivers@dignus.com> To: freebsd-hackers@FreeBSD.ORG, jmz@FreeBSD.ORG Subject: Re: interesting bug in /usr/bin/cmp Message-ID: <199907282316.TAA63434@lakes.dignus.com> In-Reply-To: <199907282310.BAA20526@qix.jmz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > If someone is interested to solve a problem: > > $ dd if=/dev/zero bs=8848 count=1 of=a 2>/dev/null > $ cp a b > $ cmp a b 0 0x300 > Segmentation fault (core dumped) > $ cmp a b 0 0x200 > cmp: EOF on b > $ cmp a b 0x300 0 > cmp: EOF on a > > Jean-Marc > I've seen a similar problem when doing cmp with CD-ROM devices (I believe I entered a PR on it.) I think the problem has to do with cmp's use of mmap(), and potential issues there... But, that's just a guess on my part. What makes me think so is that cmp would declare the files on a CDROM and the files on a disk drive were different, (well, it would dump core as in your example) - while cat'ing the file from the CDROM to a temp place on the same disk and doing the cmp there would indicate there are no differences.... The speculation was that there was some problem with the SCSI CDROM... but... - Dave Rivers - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907282316.TAA63434>