All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Fix some sequencer leaks
@ 2012-05-21 14:56 Christian Couder
  2012-05-21 14:56 ` [PATCH 1/7] sequencer: fix leaked todo_list memory Christian Couder
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Christian Couder @ 2012-05-21 14:56 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Ramkumar Ramachandra, Jonathan Nieder, Nick Bowler

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-05-22 20:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 14:56 [PATCH 0/7] Fix some sequencer leaks Christian Couder
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.