[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
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name
Fri, 6 Apr 2012 20:25:51 +0200
KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; )
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 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.
That was too unclear, sorry. The new code doesn't introduce a bug, the bug is
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
(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?
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name, Jim Meyering, 2012/04/06
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name, Jean Delvare, 2012/04/10