Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 07:03:34 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        green@FreeBSD.ORG, rivers@dignus.com
Cc:        freebsd-hackers@FreeBSD.ORG, jmz@FreeBSD.ORG
Subject:   Re: interesting bug in /usr/bin/cmp
Message-ID:  <199907291103.HAA68156@lakes.dignus.com>
In-Reply-To: <Pine.BSF.4.10.9907290051210.3955-100000@janus.syracuse.net>

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.
> 
> It has to do with mmap(), but not any specific issues with mmap(), just a
> bug in its use.
> 
> If noone has any objections, I will commit this and MFC it in a week or so.

 When I get into work today, I can apply your change and see if it
 fixes my problem as well.
 
 If it works, then, we can close the PR I entered on it...  (kern/11969).

	- 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?199907291103.HAA68156>