Re: [PATCH 0/5] plugging some list-objects-filter leaks
- From
Jeff King <peff@peff.net>
- Date
- Sep 11, 2022, 04:51 UTC
- Message-ID
- <Yx1pQKfmVZegmYzM@coredump.intra.peff.net>
- In-Reply-To
- <15688f6a-4757-e201-9106-663899e35fec@github.com>
On Fri, Sep 09, 2022 at 10:20:37AM -0400, Derrick Stolee wrote:
Show 10 quoted lines
> > Of course we can drop the passing flag, but I figured it would probably > > be an easy fix. Famous last words. It turned into quite a rabbit hole of > > actual leaks (albeit small and bounded per process) and some > > questionable memory ownership semantics. > > Reading the patches, you make good arguments about the various trade- > offs in these sticky places. I agree with you in all cases, mostly > because the alternatives would not be any better unless we did a _lot_ > of work to rewrite a lot more code than these patches. Even then, the > benefit is unclear.
Thanks for looking them over. I wondered if I was just being lazy and/or cowardly in not teaching callers to initialize the filter struct specifically (rather than memset to zero).
So of course I started looking at it, and of course it was way more complicated than you'd imagine. So I have no regrets in drawing the line where I did in this leak-plugging series.
But now that I did do it, it turned out to reveal other oddities in the filter code! So I'll post that as a separate series on top. Even if we don't go all the way with the cleanup, we should at least fix the oddities.
> > Here's the series I came up with. I'm cc-ing Stolee as the last person > > unfortunate enough to have touched this area. :) > > Lucky me!
It's the gift that keeps on giving. Guess what you're about to get cc'd on. ;)
-Peff