bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-patch] Broken patch commit: don't warn twice about the same inv


From: Jim Meyering
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name
Date: Fri, 06 Apr 2012 22:20:51 +0200

Andreas Gruenbacher wrote:

> On Friday 06 April 2012 18:41:46 Jim Meyering wrote:
>> Andreas Gruenbacher wrote:
>> > we remember the first and last bad name here, not all the bad names of the
>> > last patch (bad[0] is never cleared), so that's a bug.
>>
>> Really?  Why?  It's static, so not a real leak.
>>
>> It's the same code as before, but without the use-after-free.
>> I see no harm (nor particular benefit) in retaining the first
>> invalid name in bad[0].
>
> That was too unclear, sorry. The new code doesn't introduce a bug, the bug is
> already there.
>
> I can imagine two different behaviors: either we only report each invalid name
> exactly once, globally; or we treat each patch exactly the same. Behavior one
> would require to remember all bad names. I don't think this is needed or
> useful, and I would prefer behavior two. I was assuming that this is what the
> code implements, but it doesn't: it won't report the first invalid name ever
> again.
>
> (The invalid name could be something generic like ".."; it may well be that
> every patch in an input file has the same broken patch header. IMO we should
> report problems like that every time.)
>
> Does this kind of thinking make sense to you?

That clarifies it.  Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]