Skip to content

dirstat: leakfix

Junio C Hamano git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2diff: refactor common tail part of dirstat computationdiff.c+15 -140 replies
2/2diff: plug leaks in dirstatdiff.c t/t4047-diff-dirstat.sh+13 -60 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] dirstat: leakfix

Review

Quoted 5 lines · Junio C Hamano
 t/t4000-diff-format.sh         | 34 +++++++++++++++++++++++++++++++++-

...

(quoted diff) +3 -0
+for format in stat raw numstat shortstat summary \
+	dirstat cumulative dirstat-by-file \
+	patch-with-raw patch-with-stat compact-summary

Unfortunately, because t4000 is marked as passing with leak sanitizer on, even though this series does not introduce any new leaks (in fact, there is nothing in the series that allocates pieces of memory at all), the CI will fail with the sanitizer job.

Needless to say, I hate the current arrangement of these tests. Those who happen to use tools or features that have nothing to do with the topic being developed that introduces no new leaks are punished by a test failure.

Here are a pair of patches that plug leaks in dirstat code. This allows the "fix interaction between -s and others" patch that adds a test that exercises --dirstat in t4000 to be queued without breaking the leak sanitizer.

Also t4047 that is about dirstat can now be marked as leak free.

Junio C Hamano (2):
diff: refactor common tail part of dirstat computation
diff: plug leaks in dirstat

 diff.c                  | 34 ++++++++++++++++++++--------------
 t/t4047-diff-dirstat.sh |  2 ++
 2 files changed, 22 insertions(+), 14 deletions(-)
Signature · 1 line
2.40.1-476-g69c786637d