Skip to content

Memory leak fixes (pt.8)

Patrick Steinhardt git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23builtin/annotate: fix leaking args vectorbuiltin/annotate.c t/t8001-annotate.sh+16 -50 replies
2/23read-cache: fix leaking hash context in `do_write_index()`read-cache.c+1 -01 reply
3/23scalar: fix leaking repositoriesscalar.c t/t9210-scalar.sh t/t9211-scalar-clone.sh+3 -00 replies
4/23shell: fix leaking stringsshell.c t/t9400-git-cvsserver-server.sh t/t9850-shell.sh+6 -30 replies
5/23wt-status: fix leaking buffer with sparse directoriest/t1092-sparse-checkout-compatibility.sh wt-status.c+6 -10 replies
6/23submodule: fix leaking submodule entry listbranch.c submodule-config.c submodule-config.h +1 more+24 -30 replies
7/23builtin/stash: fix leaking `pathspec_from_file`builtin/stash.c t/t3909-stash-pathspec-file.sh+4 -10 replies
8/23builtin/pack-redundant: fix various memory leaksbuiltin/pack-redundant.c t/t5323-pack-redundant.sh+35 -60 replies
9/23builtin/clone: fix leaking repo state when cloning with bundle URIsbuiltin/clone.c t/t5730-protocol-v2-bundle-uri-file.sh t/t5731-protocol-v2-bundle-uri-git.sh +1 more+30 -00 replies
10/23t/helper: fix leaking repository in partial-clone helpert/helper/test-partial-clone.c t/t0410-partial-clone.sh+3 -00 replies
11/23builtin/revert: fix leaking `gpg_sign` and `strategy` configbuiltin/revert.c t/t3514-cherry-pick-revert-gpg.sh+14 -40 replies
12/23diff: improve lifecycle management of diff queuesbloom.c diff.c diffcore-break.c +7 more+32 -470 replies
13/23line-log: fix several memory leaksline-log.c+35 -190 replies
14/23pseudo-merge: fix various memory leakspack-bitmap-write.c pack-bitmap.c pseudo-merge.c +1 more+31 -21 reply
15/23pseudo-merge: fix leaking strmap keyspseudo-merge.c+2 -24 replies
16/23pack-bitmap-write: fix leaking OID arraypack-bitmap-write.c t/t5333-pseudo-merge-bitmaps.sh+2 -01 reply
17/23midx-write: fix leaking buffermidx-write.c t/t5334-incremental-multi-pack-index.sh+4 -02 replies
18/23revision: fix memory leaks when rewriting parentsrevision.c t/t3427-rebase-subtree.sh t/t6016-rev-list-graph-simplify-history.sh +3 more+7 -00 replies
19/23revision: fix leaking saved parentsrevision.c t/t6012-rev-list-simplify.sh+11 -20 replies
20/23pack-write: fix return parameter of `write_rev_file_order()`builtin/index-pack.c midx-write.c pack-write.c +2 more+31 -260 replies
21/23t/helper: fix leaks in proc-receive helpert/helper/test-proc-receive.c+7 -00 replies
22/23remote: fix leaking push reportsbuiltin/receive-pack.c remote.c remote.h+22 -20 replies
23/23builtin/send-pack: fix leaking list of push optionsbuiltin/send-pack.c t/t5411-proc-receive-hook.sh t/t5545-push-options.sh+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/23] Memory leak fixes (pt.8)

Hi,

this is the 8th series of memory leak fixes. As usual, it fixes memory leaks all over the place. Once applied, we're down to 35 test suites that do not pass with the memory leak sanitizer.

This series is built on top of 3857aae53f (Git 2.47-rc0, 2024-09-25) with the following two topisc merged into it:

- ps/leakfixes-part-7 at 12dfc2475c (diffcore-break: fix leaking

    filespecs when merging broken pairs, 2024-09-26).

- jk/http-leakfixes at f4c768c639 (http-push: clean up local_refs at

    exit, 2024-09-24).

Both of these topics are part of next.

Thanks!

Patrick

Patrick Steinhardt (23):
builtin/annotate: fix leaking args vector
read-cache: fix leaking hash context in do_write_index()
scalar: fix leaking repositories
shell: fix leaking strings
wt-status: fix leaking buffer with sparse directories
submodule: fix leaking submodule entry list builtin/stash: fix leaking pathspec_from_file builtin/pack-redundant: fix various memory leaks builtin/clone: fix leaking repo state when cloning with bundle URIs t/helper: fix leaking repository in partial-clone helper builtin/revert: fix leaking gpg_sign and strategy config
diff: improve lifecycle management of diff queues
line-log: fix several memory leaks
pseudo-merge: fix various memory leaks
pseudo-merge: fix leaking strmap keys
pack-bitmap-write: fix leaking OID array
midx-write: fix leaking buffer
revision: fix memory leaks when rewriting parents
revision: fix leaking saved parents
pack-write: fix return parameter of write_rev_file_order() t/helper: fix leaks in proc-receive helper
remote: fix leaking push reports
builtin/send-pack: fix leaking list of push options

 bloom.c                                    |  8 +--
 branch.c                                   |  8 ++-
 builtin/annotate.c                         | 20 +++++--
 builtin/clone.c                            | 27 +++++++++
 builtin/index-pack.c                       |  7 +--
 builtin/pack-redundant.c                   | 40 +++++++++++--
 builtin/receive-pack.c                     |  5 +-
 builtin/revert.c                           | 17 ++++--
 builtin/send-pack.c                        |  1 +
 builtin/stash.c                            |  4 +-
 diff.c                                     | 22 +++----
 diffcore-break.c                           |  8 +--
 diffcore-pickaxe.c                         |  4 +-
 diffcore-rename.c                          |  3 +-
 diffcore-rotate.c                          |  3 +-
 diffcore.h                                 | 10 ++--
 line-log.c                                 | 69 +++++++++++++---------
 log-tree.c                                 |  4 +-
 merge-ort.c                                |  2 +-
 midx-write.c                               |  5 +-
 pack-bitmap-write.c                        |  9 +++
 pack-bitmap.c                              |  4 +-
 pack-write.c                               | 42 +++++++------
 pack.h                                     |  4 +-
 pseudo-merge.c                             | 23 +++++++-
 pseudo-merge.h                             |  2 +
 read-cache.c                               |  1 +
 remote.c                                   | 15 +++++
 remote.h                                   |  4 +-
 revision.c                                 | 14 ++++-
 scalar.c                                   |  1 +
 shell.c                                    |  6 +-
 submodule-config.c                         | 15 ++++-
 submodule-config.h                         |  3 +
 t/helper/test-partial-clone.c              |  2 +
 t/helper/test-proc-receive.c               |  7 +++
 t/t0410-partial-clone.sh                   |  1 +
 t/t1092-sparse-checkout-compatibility.sh   |  1 +
 t/t3207-branch-submodule.sh                |  1 +
 t/t3427-rebase-subtree.sh                  |  1 +
 t/t3514-cherry-pick-revert-gpg.sh          |  1 +
 t/t3909-stash-pathspec-file.sh             |  1 +
 t/t5323-pack-redundant.sh                  |  1 +
 t/t5327-multi-pack-bitmaps-rev.sh          |  1 +
 t/t5333-pseudo-merge-bitmaps.sh            |  1 +
 t/t5334-incremental-multi-pack-index.sh    |  2 +
 t/t5411-proc-receive-hook.sh               |  1 +
 t/t5545-push-options.sh                    |  1 +
 t/t5730-protocol-v2-bundle-uri-file.sh     |  1 +
 t/t5731-protocol-v2-bundle-uri-git.sh      |  1 +
 t/t5732-protocol-v2-bundle-uri-http.sh     |  1 +
 t/t6012-rev-list-simplify.sh               |  1 +
 t/t6016-rev-list-graph-simplify-history.sh |  1 +
 t/t7003-filter-branch.sh                   |  1 +
 t/t8001-annotate.sh                        |  1 +
 t/t9210-scalar.sh                          |  1 +
 t/t9211-scalar-clone.sh                    |  1 +
 t/t9350-fast-export.sh                     |  1 +
 t/t9400-git-cvsserver-server.sh            |  1 +
 t/t9402-git-cvsserver-refs.sh              |  1 +
 t/t9850-shell.sh                           |  2 +
 wt-status.c                                |  6 +-
 62 files changed, 329 insertions(+), 123 deletions(-)
Signature · 1 line
2.46.2.852.g229c0bf0e5.dirty