git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] test-lib: GIT_TEST_SANITIZE_LEAK_LOG enabled by default

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 22, 2024, 07:52 UTC
Message-ID
<Zp4Pq-adl2mwA8ql@tanuki>
In-Reply-To
<20240710011206.GC1526498@coredump.intra.peff.net>
On Tue, Jul 09, 2024 at 09:12:06PM -0400, Jeff King wrote:
Show 17 quoted lines
> On Wed, Jul 10, 2024 at 02:51:58AM +0200, Rubén Justo wrote:
> 
> > As we describe in t/README, it can happen that:
> > 
> >     Some tests run "git" (or "test-tool" etc.) without properly checking
> >     the exit code, or git will invoke itself and fail to ferry the
> >     abort() exit code to the original caller.
> > 
> > Therefore, GIT_TEST_SANITIZE_LEAK_LOG must be set to true to capture all
> > memory leaks triggered by the tests when SANITIZE=leak.
> > 
> > Set it to true by default, and stop worrying about someone checking for
> > leaks who isn't aware of this option and might be missing some leaks.
> 
> I'm obviously in favor of this direction, but...why stop here? Do we
> expect somebody to set it to false? If not, then can't we just get rid
> of it entirely?

I'd also be strongly in favor of just removing this variable altogether. I found it quite tedious to remember setting it when working on the memory leak fixes recently, and I'm not aware of any downsides.

Patrick
Previous: Jeff KingNext: Rubén Justo
Message 3 of 10 in “test-lib: GIT_TEST_SANITIZE_LEAK_LOG enabled by default”
  1. test-lib: GIT_TEST_SANITIZE_LEAK_LOG enabled by defaultRubén Justo, Jul 10, 2024
  2. Jeff KingJul 10, 2024
  3. Patrick SteinhardtJul 22, 2024
  4. test-lib: GIT_TEST_SANITIZE_LEAK_LOG enabled by defaultRubén Justo, Jul 10, 2024
  5. Junio C HamanoJul 10, 2024
  6. Rubén JustoJul 10, 2024
  7. Jeff KingJul 10, 2024
  8. Rubén JustoJul 11, 2024
  9. test-lib: GIT_TEST_SANITIZE_LEAK_LOG enabled by defaultRubén Justo, Jul 11, 2024
  10. Jeff KingJul 17, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.