We noticed a seg fault in "diff" while building MySQL on a Tilera
processor board under Linux.  I tracked it down to the fact that in one
place a pointer is initialized with "ptr = start - 1" and then later
tested with "start > ptr".  Unfortunately in the failing case "start" is
NULL, so "ptr" ends up as a very large number (-16UL, basically), and so
the ">" test doesn't work.  I can provide a more detailed changelog
entry and patch if changes to 1.15.3 are still interesting, but I'm
guessing they're not, due to the complete rewrite of "diff" in 1.16.0.

However that version of "diff" doesn't work very well, at least for us. 
I'd be curious to know if, for example, it passes the testsuite diff
tests for other platforms.  On our platform the 1.16.0 diff gives bogus
output like this:

# echo foo > /tmp/foo
# diff -u /tmp/foo /etc/resolv.conf
--- /tmp/foo
+++ /etc/resolv.conf
@@ -1 +1,3 @@
-foo

\ No newline at end of file
++domain internal.tiler+a.com tad.internal.ti#


Notice the filenames are missing at the end of the "---" and "+++"
lines, the "No newline at end of file" message is issued incorrectly,
and the contents of /etc/resolv.conf (not shown but pretty standard; you
can guess) are gibberish.

If indeed 1.16.0 passes the testsuite for diff on other platforms, I'll
assume it's something wacky on our end, and we can investigate it
further.  For now we're staying at 1.15.3, which does pass the testsuite
for us with SKIP_KNOWN_BUGS=1, and we don't need any of the 1.16.0
functionality yet.

(Well, the testsuite almost passes: I did need a small hack in
coreutils/tail.c to pass "tail.test", which was reporting a "short
write" error otherwise, and the "grep handles/matches NUL" tests in
grep.tests don't seem to pass for us either.  If there's interest I can
send some patches for that stuff as well.)

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to