On 3/12/2010 4:56 PM, Matheus Izvekov wrote:
> There is some misunderstanding here. That code above is from the old
> version of diff.
> I just tested here, and under those conditions you mentioned, the new diff
> works as expected, and the old one segfaults, just like you said.
>   

That matches my understanding.  The patch was indeed for the old diff
(which is why, as I said, I didn't think anyone would be interested in it).

> Yes, that was intentional. I asked here on the list if anyone would be
> bothered if that feature was removed, and no one seemed to care. Are you
> just noticing this, or are you complaining about it? Do you need this?
> Even though old diff used ctime for that, and gnu diff seems to use
> something else with another format?
>   

I may have joined the list after you asked, since I don't recall this. 
In any case, I don't really care strongly one way or the other -- my
instinct would be to provide some kind of timestamp here.  I always
assumed it was mtime, but you often wouldn't notice a ctime vs mtime
distinction in any case.

> But I'm still bothered that some tests in
> the suite are failing for you. Can you provide more details on that?
>   

Not at the moment (I'm actually away this weekend, and just briefly
checking email).  I'll see if I can rebuild with 1.16.0 and provide more
feedback sometime soon.

>> The tail.c bug is pretty clearly wrong; I don't know why it isn't seen
>> on other platforms.  The fix is to guard the call to
>> "xwrite(STDOUT_FILENO, buf + nread - nwrite, nwrite)" at
>> coreutils/tail.c:244 with an "if (nwrite > 0)", since otherwise the
>> third parameter of xwrite() can be negative.  Consider count = 50, nread
>> = 10 for the first read; the "nwrite -= (count - seen)" at line 232 will
>> make nwrite (initialized to the value of nread) negative.
>>     
>
> Can you provide a test case for that?
>   

The "tail.tests" testcase tests exactly this issue; it failed for us.

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


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

Reply via email to