Re: [PATCH 3/7] worktree move: new command
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2018, 02:13 UTC
- Message-ID
- <20180206021313.GA26323@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8A+zMTC2N8Y0Ua-KyLF6Wp2oHL=8mbsSXck6mKZGG=37g@mail.gmail.com>
On Mon, Feb 05, 2018 at 08:28:10PM +0700, Duy Nguyen wrote:
Show 12 quoted lines
> >> This is still leaking 'worktrees'[1]. You probably want > >> free_worktrees() immediately after the find_worktree() invocation. > > > > Sorry, free_worktrees() after the last use of 'wt' since you still > > need to access its fields, which would be the end of the function. > > I learned SANITIZE=leak today! It not only catches this but also "dst". > > Jeff is there any ongoing effort to make the test suite pass with > SANITIZE=leak? My t2038 passed, so I went ahead with the full test > suite and saw so many failures. I did see in your original mails that > you focused on t0000 and t0001 only..
Yeah, I did those two scripts to try to prove to myself that the approach was good. But I haven't really pushed it any further.
Martin Ågren (cc'd) did some follow-up work, but I think we still have a long way to go. My hope is that people who are interested in leak-checking their new code can run some specific script they're interested in, and maybe fix up one or two nearby bits while they're there (either by fixing a leak, or just annotating via UNLEAK). Then we can slowly converge on correctness. :)
-Peff