[Bug 212723] cmp returns EOF for different files

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 16 08:51:08 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212723

            Bug ID: 212723
           Summary: cmp returns EOF for different files
           Product: Base System
           Version: 10.3-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: tigger at lvlworld.com
                CC: freebsd-amd64 at FreeBSD.org
                CC: freebsd-amd64 at FreeBSD.org

The following test can be used to reproduce the issue.

 echo "t" > t1 ; cp t1 t2 ; echo "t" >> t1
 cmp t1 t2

Which will produce this error message:

 cmp: EOF on t2

However, this test works perfectly:

 echo "x" > x ; echo "y" > y
 cmp x y

Which returns the expected result:

 x y differ: char 1, line 1

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list