Subject: cmp tickles codegen bug when comparing identical files of 4222 bytes.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nick@nthcliff.demon.co.uk>
List: netbsd-bugs
Date: 09/04/2000 14:14:48
>Number:         10944
>Category:       bin
>Synopsis:       cmp tickles codegen bug when comparing identical files of 4222 bytes.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 04 06:17:00 PDT 2000
>Closed-Date:    
>Last-Modified:  Tue Sep 05 07:42:18 PDT 2000
>Originator:     Nick Hudson
>Release:        NetBSD 1.5_ALPHA2
>Organization:
>Environment:
System: NetBSD go61923 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (GO61923) #8: Mon Aug 28 13:19:35 BST 2000 root@go61923:/usr/NetBSD-current/cvs/syssrc/sys/arch/i386/compile/GO61923 i386


>Description:
	See subject
>How-To-Repeat:
$ cat cmp-bug
dd if=/dev/urandom of=n1 bs=1 count=4222
dd if=/dev/urandom of=n2 bs=1 count=4222
cmp n1 n2
$ ./cmp-bug
4222+0 records in
4222+0 records out
4222 bytes transferred in 1 secs (4222 bytes/sec)
4222+0 records in
4222+0 records out
4222 bytes transferred in 1 secs (4222 bytes/sec)
Segmentation fault - core dumped
$

>Fix:
	A workaround is to compile cmp -O instead of -O2
>Release-Note:
>Audit-Trail:

From: Nick Hudson <nick@nthcliff.demon.co.uk>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: Re: bin/10944: cmp tickles codegen bug when comparing identical files of 
 4222 bytes.
Date: Tue, 05 Sep 2000 11:41:24 +0100

 OK. So this did happen, but I cannot reproduce it (today) anymore. ;-(
 
 I got all sorts of strange behaviour with this and I'll keep tabs on it.
 
 The only thing that has changed is that I have rebuilt the kernel in the
 mean time.
 
 Nick
>Unformatted: