git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel C. Klauer" <daniel.c.klauer@web.de>
To: git@vger.kernel.org
Subject: bug report: "git pack-redundant --all" crash in minimize()
Date: Tue, 15 Dec 2020 18:34:53 +0100	[thread overview]
Message-ID: <dc410ef1-fc05-162e-ed4e-c843e0bc285d@web.de> (raw)

Hello,

I'm getting the following crash from "git pack-redundant --all" (output
from valgrind):

==14070== Invalid read of size 8
==14070==    at 0x18F165: minimize (pack-redundant.c:399)
==14070==    by 0x18F165: cmd_pack_redundant (pack-redundant.c:622)
==14070==    by 0x1242D3: run_builtin (git.c:444)
==14070==    by 0x1242D3: handle_builtin (git.c:674)
==14070==    by 0x125393: run_argv (git.c:741)
==14070==    by 0x125393: cmd_main (git.c:872)
==14070==    by 0x123E7D: main (common-main.c:52)
==14070==  Address 0x10 is not stack'd, malloc'd or (recently) free'd

Commands to reproduce:

mkdir new
cd new
git init
touch foo.txt
git add foo.txt
git commit -m "first commit"
git gc
git pack-redundant --all

The same happens with Ubuntu's git 2.25.1 as well as manually compiled
git 2.30.0.rc0 from current master.

The reason this showed up is that Yocto's build tool, bitbake, sometimes
invokes this git command on some of the repositories it downloaded. This
issue was apparently also reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=1803506

Kind Regards,
Daniel

             reply	other threads:[~2020-12-15 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 17:34 Daniel C. Klauer [this message]
2020-12-15 18:21 ` bug report: "git pack-redundant --all" crash in minimize() Jeff King
2020-12-15 22:32   ` Junio C Hamano
2020-12-16  9:21   ` Jiang Xin
2020-12-16 10:09     ` [PATCH] pack-redundant: fix crash when one packfile in repo Jiang Xin
2020-12-16 17:32       ` Junio C Hamano
2020-12-17  1:57         ` [PATCH v2] " Jiang Xin
2020-12-17  6:08           ` Junio C Hamano
2020-12-16 18:46       ` [PATCH] " Jeff King
2020-12-16 13:22   ` bug report: "git pack-redundant --all" crash in minimize() Daniel Klauer
2020-12-16 19:00     ` Jeff King

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=dc410ef1-fc05-162e-ed4e-c843e0bc285d@web.de \
    --to=daniel.c.klauer@web.de \
    --cc=git@vger.kernel.org \
    /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).