From owner-freebsd-hackers Wed Jul 28 16:17:13 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp2.vnet.net (smtp2.vnet.net [166.82.1.32]) by hub.freebsd.org (Postfix) with ESMTP id 0F6DB154EF; Wed, 28 Jul 1999 16:17:04 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by smtp2.vnet.net (8.9.1a/8.9.1) with ESMTP id TAA09123; Wed, 28 Jul 1999 19:16:36 -0400 (EDT) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by dignus.com (8.9.2/8.8.5) with ESMTP id TAA08909; Wed, 28 Jul 1999 19:16:35 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.9.2/8.6.9) id TAA63434; Wed, 28 Jul 1999 19:16:34 -0400 (EDT) Date: Wed, 28 Jul 1999 19:16:34 -0400 (EDT) From: Thomas David Rivers Message-Id: <199907282316.TAA63434@lakes.dignus.com> To: freebsd-hackers@FreeBSD.ORG, jmz@FreeBSD.ORG Subject: Re: interesting bug in /usr/bin/cmp In-Reply-To: <199907282310.BAA20526@qix.jmz.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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