mbox series

[00/23] Memory leak fixes (pt.7)

Message ID cover.1726484308.git.ps@pks.im (mailing list archive)
Headers show
Series Memory leak fixes (pt.7) | expand

Message

Patrick Steinhardt Sept. 16, 2024, 11:45 a.m. UTC
Hi,

as usual, whenever the previous part of memory leak fixes has landed,
here's the next one. This series brings us down to 80 leaking test
suites. The 8th part is almost ready, too, bringing us down to 48
leaking suites. So the end is near, and I hope that our test suites are
leak free after the 10th part has landed.

The patch series is built on top of ed155187b4 (Sync with Git 2.46.1,
2024-09-13) with ps/leakfixes-part-6 at 46f6ca2a68 (builtin/repack: fix
leaking keep-pack list, 2024-09-05) merged into it.

Thanks!

Patrick

Patrick Steinhardt (23):
  builtin/help: fix dangling reference to `html_path`
  builtin/help: fix leaking `html_path` when reading config multiple
    times
  git: fix leaking argv when handling builtins
  submodule: fix leaking update strategy
  builtin/submodule--helper: clear child process when not running it
  builtin/submodule--helper: fix leaking error buffer
  t/helper: fix leaking subrepo in nested submodule config helper
  builtin/submodule--helper: fix leaking remote ref on errors
  dir: fix off by one errors for ignored and untracked entries
  builtin/pull: fix leaking "ff" option
  diff: fix leaking orderfile option
  parse-options: free previous value of `OPTION_FILENAME`
  diffcore-order: fix leaking buffer when parsing orderfiles
  builtin/repack: fix leaking configuration
  builtin/difftool: plug several trivial memory leaks
  trace2: destroy context stored in thread-local storage
  submodule: fix leaking submodule ODB paths
  grep: fix leaking grep pattern
  promisor-remote: fix leaking partial clone filter
  builtin/maintenance: fix leaking config string
  builtin/maintenance: fix leak in `get_schedule_cmd()`
  revision: fix leaking parents when simplifying commits
  diffcore-break: fix leaking filespecs when merging broken pairs

 builtin/difftool.c                            |   6 +
 builtin/gc.c                                  | 131 +++++++++++-------
 builtin/help.c                                |  16 ++-
 builtin/pull.c                                |  11 +-
 builtin/repack.c                              |  57 ++++++--
 builtin/submodule--helper.c                   |  26 +++-
 combine-diff.c                                |   3 +-
 diff.c                                        |   7 +-
 diff.h                                        |   2 +-
 diffcore-break.c                              |   4 +-
 diffcore-order.c                              |  19 +--
 dir.c                                         |   6 +-
 git.c                                         |  22 ++-
 grep.c                                        |   2 +-
 parse-options.c                               |  22 +--
 promisor-remote.c                             |   2 +
 revision.c                                    |   5 +
 submodule-config.c                            |   2 +-
 submodule.c                                   |   9 +-
 submodule.h                                   |   6 +-
 t/helper/test-submodule-nested-repo-config.c  |   2 +-
 t/t0012-help.sh                               |   1 +
 t/t1414-reflog-walk.sh                        |   1 +
 ...common-prefixes-and-directory-traversal.sh |   1 +
 t/t4008-diff-break-rewrite.sh                 |   2 +
 t/t4022-diff-rewrite.sh                       |   1 +
 t/t4023-diff-rename-typechange.sh             |   1 +
 t/t4031-diff-rewrite-binary.sh                |   1 +
 t/t4056-diff-order.sh                         |   1 +
 t/t4204-patch-id.sh                           |   1 +
 t/t5310-pack-bitmaps.sh                       |   1 +
 t/t5326-multi-pack-bitmaps.sh                 |   2 +
 t/t5329-pack-objects-cruft.sh                 |   2 +
 t/t6004-rev-list-path-optim.sh                |   1 +
 t/t6019-rev-list-ancestry-path.sh             |   1 +
 t/t6111-rev-list-treesame.sh                  |   1 +
 t/t7061-wtstatus-ignore.sh                    |   1 +
 t/t7406-submodule-update.sh                   |   1 +
 t/t7407-submodule-foreach.sh                  |   1 +
 t/t7408-submodule-reference.sh                |   2 +
 t/t7411-submodule-config.sh                   |   1 +
 t/t7420-submodule-set-url.sh                  |   1 +
 t/t7521-ignored-mode.sh                       |   1 +
 t/t7524-commit-summary.sh                     |   2 +
 t/t7601-merge-pull-config.sh                  |   1 +
 t/t7700-repack.sh                             |   1 +
 t/t7800-difftool.sh                           |   1 +
 t/t7814-grep-recurse-submodules.sh            |   1 +
 t/t7900-maintenance.sh                        |   1 +
 trace2/tr2_tls.c                              |  10 +-
 50 files changed, 279 insertions(+), 124 deletions(-)

Comments

Junio C Hamano Sept. 19, 2024, 6:54 p.m. UTC | #1
Patrick Steinhardt <ps@pks.im> writes:

> The patch series is built on top of ed155187b4 (Sync with Git 2.46.1,
> 2024-09-13) with ps/leakfixes-part-6 at 46f6ca2a68 (builtin/repack: fix
> leaking keep-pack list, 2024-09-05) merged into it.

I haven't said this, but I really appreciate contributors (like you)
pacing their series submission perfectly with the rate of related
topics in flight solidifying.  If people hold off sending new and
dependent topics for too long, that would waste available review and
testing bandwidth, but if people send them while the other topics
that they depend on are not yet in a good shape, it would require
conflict resolutions that may get wasted when the depended topics
have to be updated.

I've been trying to be more explicit in the "What's cooking" report
what my evaluation of each topic's "doneness" is, to help contributors
who need to send new topics that may conflict with the topics that
are already cooking, and I hope it helped in your (and other
contributors') pacing their submissions to help the process run more
smoothly.

THanks.
Patrick Steinhardt Sept. 24, 2024, 7:20 a.m. UTC | #2
On Thu, Sep 19, 2024 at 11:54:38AM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > The patch series is built on top of ed155187b4 (Sync with Git 2.46.1,
> > 2024-09-13) with ps/leakfixes-part-6 at 46f6ca2a68 (builtin/repack: fix
> > leaking keep-pack list, 2024-09-05) merged into it.
> 
> I haven't said this, but I really appreciate contributors (like you)
> pacing their series submission perfectly with the rate of related
> topics in flight solidifying.  If people hold off sending new and
> dependent topics for too long, that would waste available review and
> testing bandwidth, but if people send them while the other topics
> that they depend on are not yet in a good shape, it would require
> conflict resolutions that may get wasted when the depended topics
> have to be updated.
> 
> I've been trying to be more explicit in the "What's cooking" report
> what my evaluation of each topic's "doneness" is, to help contributors
> who need to send new topics that may conflict with the topics that
> are already cooking, and I hope it helped in your (and other
> contributors') pacing their submissions to help the process run more
> smoothly.

This series of patch series was something where I wasn't immediately
sure for how well-received it will be. In order to make progress and not
be busy with memory leak fixes for the next couple years I had to keep a
steady pace that wasn't too slow. But sending out a 20-patch series
every other week could feel overwhelming to some folks.

So I'm happy to hear that this is well-received overall. Thanks, and
also thanks for your reviews!

Patrick