Bug 18589

Summary: cmp(1) chokes on large files
Product: Base System Reporter: Poul-Henning Kamp <phk>
Component: binAssignee: Mike Heffner <mikeh>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Poul-Henning Kamp freebsd_committer freebsd_triage 2000-05-16 09:40:03 UTC
The cmp(1) program mmaps the files to be compared.  This fails for large files.

Fix: 

Add a loop around the mmap/compare operation which operates on some moderate amount of data each iteration.
How-To-Repeat: cmp -l file.1 file.2  where the two files are 3242115072 bytes long
Comment 1 Mike Heffner freebsd_committer freebsd_triage 2001-06-16 21:07:11 UTC
Responsible Changed
From-To: freebsd-bugs->mikeh

Add another one to the todo list. I'm working on some patches for 
this anyways.
Comment 2 dwmalone freebsd_committer freebsd_triage 2001-11-04 21:34:47 UTC
State Changed
From-To: open->closed

Closed in favour of PR 24732, which has patches which have been committed 
to -current.