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

[PATCH 0/9] test-tool: fix memory leaks

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 30, 2022, 23:47 UTC
Message-ID
<cover-0.9-00000000000-20220630T180129Z-avarab@gmail.com>

This is a series of trivial leak-fixes which allows us to mark various tests as entirely passing under SANITIZE=leak, the reasn they weren't passing before was because we'd spot memory leaks in test-tool, rather than git itself.

This is a sibling series to my just-submitted series for fixing memory leaks in built-ins[1], but the the two do not textually or semantically conflict.

There are still a few other test-tool memory leaks, but these are the ones I had patches ready for, having focused on trying to get t00*.sh passing first, and then picking some low-hanging fruit after that.

Passing CI for this series can be found at [2].
1. https://lore.kernel.org/git/cover-00.11-00000000000-20220630T175714Z-avarab@gmail.com/
2. https://github.com/avar/git/tree/avar/test-tool-memory-leaks
Ævar Arnfjörð Bjarmason (9):
  test-tool test-hash: fix a memory leak
  test-tool path-utils: fix a memory leak
  test-tool {dump,scrap}-cache-tree: fix memory leaks
  test-tool urlmatch-normalization: fix a memory leak
  test-tool regex: call regfree(), fix memory leaks
  test-tool json-writer: fix memory leaks
  test-tool bloom: fix a memory leak
  test-tool ref-store: fix a memory leak
  test-tool delta: fix a memory leak
 t/helper/test-bloom.c                  |  2 ++
 t/helper/test-delta.c                  | 21 +++++++++-----
 t/helper/test-dump-cache-tree.c        |  7 ++++-
 t/helper/test-hash.c                   |  1 +
 t/helper/test-json-writer.c            | 16 ++++++++---
 t/helper/test-path-utils.c             | 10 +++++--
 t/helper/test-ref-store.c              |  1 +
 t/helper/test-regex.c                  | 40 ++++++++++++++++----------
 t/helper/test-scrap-cache-tree.c       |  1 +
 t/helper/test-urlmatch-normalization.c | 11 +++++--
 t/t0015-hash.sh                        |  3 +-
 t/t0019-json-writer.sh                 |  2 ++
 t/t0060-path-utils.sh                  |  1 +
 t/t0090-cache-tree.sh                  |  2 ++
 t/t0095-bloom.sh                       |  2 +-
 t/t0110-urlmatch-normalization.sh      |  2 ++
 t/t5303-pack-corruption-resilience.sh  |  2 ++
 t/t5308-pack-detect-duplicates.sh      |  2 ++
 t/t5309-pack-delta-cycles.sh           |  2 ++
 t/t5321-pack-large-objects.sh          |  2 ++
 t/t7812-grep-icase-non-ascii.sh        |  1 +
 21 files changed, 97 insertions(+), 34 deletions(-)
-- 
2.37.0.874.g7d3439f13c4
Next: Ævar Arnfjörð Bjarmason
Message 1 of 26 in “test-tool: fix memory leaks”
  1. 0/9 test-tool: fix memory leaksÆvar Arnfjörð Bjarmason, Jun 30, 2022
  2. 3/9 test-tool {dump,scrap}-cache-tree: fix memory leaksÆvar Arnfjörð Bjarmason, Jun 30, 2022
  3. 2/9 test-tool path-utils: fix a memory leakÆvar Arnfjörð Bjarmason, Jun 30, 2022
  4. Eric SunshineJul 1, 2022
  5. Ævar Arnfjörð BjarmasonJul 1, 2022
  6. 1/9 test-tool test-hash: fix a memory leakÆvar Arnfjörð Bjarmason, Jun 30, 2022
  7. 8/9 test-tool ref-store: fix a memory leakÆvar Arnfjörð Bjarmason, Jun 30, 2022
  8. 4/9 test-tool urlmatch-normalization: fix a memory leakÆvar Arnfjörð Bjarmason, Jun 30, 2022
  9. 5/9 test-tool regex: call regfree(), fix memory leaksÆvar Arnfjörð Bjarmason, Jun 30, 2022
  10. Junio C HamanoJul 1, 2022
  11. 7/9 test-tool bloom: fix a memory leakÆvar Arnfjörð Bjarmason, Jun 30, 2022
  12. Eric SunshineJul 1, 2022
  13. Ævar Arnfjörð BjarmasonJul 1, 2022
  14. 9/9 test-tool delta: fix a memory leakÆvar Arnfjörð Bjarmason, Jun 30, 2022
  15. 6/9 test-tool json-writer: fix memory leaksÆvar Arnfjörð Bjarmason, Jun 30, 2022
  16. 0/9 test-tool: fix memory leaksÆvar Arnfjörð Bjarmason, Jul 1, 2022
  17. 1/9 test-tool test-hash: fix a memory leakÆvar Arnfjörð Bjarmason, Jul 1, 2022
  18. 2/9 test-tool path-utils: fix a memory leakÆvar Arnfjörð Bjarmason, Jul 1, 2022
  19. Junio C HamanoJul 1, 2022
  20. 3/9 test-tool {dump,scrap}-cache-tree: fix memory leaksÆvar Arnfjörð Bjarmason, Jul 1, 2022
  21. 4/9 test-tool urlmatch-normalization: fix a memory leakÆvar Arnfjörð Bjarmason, Jul 1, 2022
  22. 5/9 test-tool regex: call regfree(), fix memory leaksÆvar Arnfjörð Bjarmason, Jul 1, 2022
  23. 6/9 test-tool json-writer: fix memory leaksÆvar Arnfjörð Bjarmason, Jul 1, 2022
  24. 7/9 test-tool bloom: fix memory leaksÆvar Arnfjörð Bjarmason, Jul 1, 2022
  25. 8/9 test-tool ref-store: fix a memory leakÆvar Arnfjörð Bjarmason, Jul 1, 2022
  26. 9/9 test-tool delta: fix a memory leakÆvar Arnfjörð Bjarmason, Jul 1, 2022

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.