All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Teng Long" <dyroneteng@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 3/3] leak tests: mark t5583-push-branches.sh as leak-free
Date: Thu, 24 Aug 2023 14:40:43 -0400	[thread overview]
Message-ID: <4011eb6a8b6200da88082a313f67bfeeca536d6a.1692902414.git.me@ttaylorr.com> (raw)
In-Reply-To: <cover.1692902414.git.me@ttaylorr.com>

When t5583-push-branches.sh was originally introduced via 425b4d7f47
(push: introduce '--branches' option, 2023-05-06), it was not leak-free.
In fact, the test did not even run correctly until 022fbb655d (t5583:
fix shebang line, 2023-05-12), but after applying that patch, we see a
failure at t5583.8:

    ==2529087==ERROR: LeakSanitizer: detected memory leaks

    Direct leak of 384 byte(s) in 1 object(s) allocated from:
        #0 0x7fb536330986 in __interceptor_realloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:98
        #1 0x55e07606cbf9 in xrealloc wrapper.c:140
        #2 0x55e075fb6cb3 in prio_queue_put prio-queue.c:42
        #3 0x55e075ec81cb in get_reachable_subset commit-reach.c:917
        #4 0x55e075fe9cce in add_missing_tags remote.c:1518
        #5 0x55e075fea1e4 in match_push_refs remote.c:1665
        #6 0x55e076050a8e in transport_push transport.c:1378
        #7 0x55e075e2eb74 in push_with_options builtin/push.c:401
        #8 0x55e075e2edb0 in do_push builtin/push.c:458
        #9 0x55e075e2ff7a in cmd_push builtin/push.c:702
        #10 0x55e075d8aaf0 in run_builtin git.c:452
        #11 0x55e075d8af08 in handle_builtin git.c:706
        #12 0x55e075d8b12c in run_argv git.c:770
        #13 0x55e075d8b6a0 in cmd_main git.c:905
        #14 0x55e075e81f07 in main common-main.c:60
        #15 0x7fb5360ab6c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
        #16 0x7fb5360ab784 in __libc_start_main_impl ../csu/libc-start.c:360
        #17 0x55e075d88f40 in _start (git+0x1ff40) (BuildId: 38ad998b85a535e786129979443630d025ec2453)

    SUMMARY: LeakSanitizer: 384 byte(s) leaked in 1 allocation(s).

This leak was addressed independently via 68b51172e3 (commit-reach: fix
memory leak in get_reachable_subset(), 2023-06-03), which makes t5583
leak-free.

But t5583 was not in the tree when 68b51172e3 was written, and the two
only met after the latter was merged back in via 693bde461c (Merge
branch 'mh/commit-reach-get-reachable-plug-leak', 2023-06-20).

At that point, t5583 was leak-free. Let's mark it as such accordingly.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 t/t5583-push-branches.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t5583-push-branches.sh b/t/t5583-push-branches.sh
index e7e1b6dab6..320f49c753 100755
--- a/t/t5583-push-branches.sh
+++ b/t/t5583-push-branches.sh
@@ -5,6 +5,7 @@ test_description='check the consisitency of behavior of --all and --branches'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 delete_refs() {
-- 
2.42.0.3.g4011eb6a8b

  parent reply	other threads:[~2023-08-24 18:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 18:40 [PATCH 0/3] leak tests: mark remaining tests leak-free as such Taylor Blau
2023-08-24 18:40 ` [PATCH 1/3] leak tests: mark a handful of tests as leak-free Taylor Blau
2023-08-24 21:02   ` Jeff King
2023-08-25 19:05     ` Taylor Blau
2023-08-25 20:38       ` Jeff King
2023-08-28 18:24         ` Junio C Hamano
2023-08-28 18:37           ` [PATCH] test-lib: ignore uninteresting LSan output Jeff King
2023-08-24 18:40 ` [PATCH 2/3] leak tests: mark t3321-notes-stripspace.sh as leak-free Taylor Blau
2023-08-24 18:40 ` Taylor Blau [this message]
2023-08-24 18:50 ` [PATCH 0/3] leak tests: mark remaining tests leak-free as such Junio C Hamano
2023-08-24 20:50 ` Jeff King
2023-08-24 20:54   ` Jeff King
2023-08-25 19:08   ` Taylor Blau
2023-08-25 20:35     ` Jeff King
2023-08-28 22:52 ` [PATCH v2 0/4] " Taylor Blau
2023-08-28 22:52   ` [PATCH v2 1/4] test-lib: ignore uninteresting LSan output Taylor Blau
2023-08-28 22:52   ` [PATCH v2 2/4] leak tests: mark a handful of tests as leak-free Taylor Blau
2023-08-28 22:53   ` [PATCH v2 3/4] leak tests: mark t3321-notes-stripspace.sh " Taylor Blau
2023-08-28 22:53   ` [PATCH v2 4/4] leak tests: mark t5583-push-branches.sh " Taylor Blau
2023-08-29  1:00   ` [PATCH v2 0/4] leak tests: mark remaining tests leak-free as such Jeff King
2023-08-29 16:43     ` Junio C Hamano

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=4011eb6a8b6200da88082a313f67bfeeca536d6a.1692902414.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=avarab@gmail.com \
    --cc=dyroneteng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 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.