From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Nick Bowler <nbowler@elliptictech.com>
Subject: [PATCH 0/7] Fix some sequencer leaks
Date: Mon, 21 May 2012 16:56:02 +0200 [thread overview]
Message-ID: <20120521143309.1911.94302.chriscool@tuxfamily.org> (raw)
Here is another iteration of a series to fix some leaks in the cherry-pick,
revert and sequencer code.
The previous iteration only had patch 1 and 2. They haven't changed.
I just added the last 5 patches.
Maybe the last 2 patches are a bit overkill. But with this series, the
valgrind output with --leak-check=full is much cleaner.
There most important leaks are still there though. One of them is
related to ce_entries, like this:
==2015== 522 bytes in 6 blocks are definitely lost in loss record 51 of 54
==2015== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2015== by 0x53113B: xcalloc (wrapper.c:119)
==2015== by 0x52BBE9: create_ce_entry (unpack-trees.c:559)
==2015== by 0x52BDC6: unpack_nondirectories (unpack-trees.c:609)
==2015== by 0x52C45B: unpack_callback (unpack-trees.c:799)
==2015== by 0x529B9B: traverse_trees (tree-walk.c:407)
==2015== by 0x52CE53: unpack_trees (unpack-trees.c:1091)
==2015== by 0x4D1B89: git_merge_trees (merge-recursive.c:241)
==2015== by 0x4D673A: merge_trees (merge-recursive.c:1819)
==2015== by 0x509521: do_recursive_merge (sequencer.c:225)
==2015== by 0x509F5B: do_pick_commit (sequencer.c:457)
==2015== by 0x50B3B4: pick_commits (sequencer.c:878)
The other one is related to the index:
==2015== 574 (400 direct, 174 indirect) bytes in 2 blocks are definitely lost in loss record 52 of 54
==2015== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2015== by 0x53113B: xcalloc (wrapper.c:119)
==2015== by 0x4EF8CF: read_index_from (read-cache.c:1441)
==2015== by 0x4EF316: read_index (read-cache.c:1282)
==2015== by 0x50940B: do_recursive_merge (sequencer.c:211)
==2015== by 0x509F5B: do_pick_commit (sequencer.c:457)
==2015== by 0x50B3B4: pick_commits (sequencer.c:878)
==2015== by 0x50B7C6: sequencer_pick_revisions (sequencer.c:994)
==2015== by 0x47A6D5: cmd_cherry_pick (revert.c:237)
==2015== by 0x404FEE: run_builtin (git.c:308)
==2015== by 0x405181: handle_internal_command (git.c:468)
==2015== by 0x40529B: run_argv (git.c:514)
Christian Couder (7):
sequencer: fix leaked todo_list memory
sequencer: release a strbuf used in save_head()
merge-recursive: free some string lists
revert: free opts.revs to do a bit of cleanup
revert: free revs->cmdline.rev
unpack-trees: record which unpack error messages should be freed
Properly free unpack trees error messages
builtin/checkout.c | 1 +
builtin/merge.c | 6 ++++--
builtin/revert.c | 6 ++++++
merge-recursive.c | 5 ++++-
sequencer.c | 16 +++++++++++++---
unpack-trees.c | 50 +++++++++++++++++++++++++++++++++++---------------
unpack-trees.h | 3 +++
7 files changed, 66 insertions(+), 21 deletions(-)
--
1.7.10.2.555.g6528037
next reply other threads:[~2012-05-21 15:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 14:56 Christian Couder [this message]
2012-05-21 14:56 ` [PATCH 1/7] sequencer: fix leaked todo_list memory Christian Couder
2012-05-21 20:57 ` Jonathan Nieder
2012-05-22 20:24 ` Christian Couder
2012-05-21 14:56 ` [PATCH 2/7] sequencer: release a strbuf used in save_head() Christian Couder
2012-05-22 4:12 ` Ramkumar Ramachandra
2012-05-22 4:23 ` Jonathan Nieder
2012-05-22 5:07 ` Ramkumar Ramachandra
2012-05-22 5:18 ` Jonathan Nieder
2012-05-22 14:17 ` Jonathan Nieder
2012-05-22 20:30 ` Christian Couder
2012-05-21 14:56 ` [PATCH 3/7] merge-recursive: free some string lists Christian Couder
2012-05-21 14:56 ` [PATCH 4/7] revert: free opts.revs to do a bit of cleanup Christian Couder
2012-05-22 5:14 ` Ramkumar Ramachandra
2012-05-22 20:03 ` Christian Couder
2012-05-21 14:56 ` [PATCH 5/7] revert: free revs->cmdline.rev Christian Couder
2012-05-21 20:39 ` Jonathan Nieder
2012-05-22 20:01 ` Christian Couder
2012-05-22 20:40 ` Jonathan Nieder
2012-05-21 14:56 ` [PATCH 6/7] unpack-trees: record which unpack error messages should be freed Christian Couder
2012-05-21 20:43 ` Jonathan Nieder
2012-05-22 20:22 ` Christian Couder
2012-05-21 14:56 ` [PATCH 7/7] Properly free unpack trees error messages Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120521143309.1911.94302.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=nbowler@elliptictech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).