From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andrzej Hunt via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Han-Wen Nienhuys <hanwen@google.com>,
Andrzej Hunt <andrzej@ahunt.org>,
Andrzej Hunt <ajrhunt@google.com>
Subject: Re: [PATCH] builtin/init-db: preemptively clear repo_fmt to avoid leaks
Date: Wed, 5 May 2021 21:28:26 +0200 (CEST) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2105052125452.50@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <pull.1018.git.git.1620240022594.gitgitgadget@gmail.com>
Hi Andrzej,
On Wed, 5 May 2021, Andrzej Hunt via GitGitGadget wrote:
> diff --git a/builtin/init-db.c b/builtin/init-db.c
> index 31b718259a64..b25147ebaf59 100644
> --- a/builtin/init-db.c
> +++ b/builtin/init-db.c
> @@ -512,6 +512,7 @@ int init_db(const char *git_dir, const char *real_git_dir,
> git_dir, len && git_dir[len-1] != '/' ? "/" : "");
> }
>
> + clear_repository_format(&repo_fmt);
I am afraid that this might not be correct, as t0410.27 experienced a
segmentation fault (see
https://github.com/git/git/pull/1018/checks?check_run_id=2511749719#step:5:2845
for the full details):
-- snip --
[...]
+ repack_and_check -a bd6a66906d425462f8fbf1e3a61cda48cc4e456c
3251618c5193c77083052fb7d6ed5e8b0b227a94
+ rm -rf repo2
+ cp -r repo repo2
+ git -C repo2 repack -a -d
warning: reflog of 'HEAD' references pruned commits
warning: reflog of 'refs/heads/master' references pruned commits
Segmentation fault (core dumped)
error: last command exited with $?=139
not ok 27 - repack -d does not irreversibly delete promisor objects
-- snap --
When I encountered similar problems with my patches in the past, I found
the `--valgrind-only` option incredibly useful, i.e. something like
cd t && sh t0410-*.sh -i -v -x --valgrind-only=27
Maybe you can give it a try?
Ciao,
Dscho
> free(original_git_dir);
> return 0;
> }
>
> base-commit: c3901c8daf043cdc16ffb20d3a410f3a2d5494fd
> --
> gitgitgadget
>
>
next prev parent reply other threads:[~2021-05-05 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 18:40 [PATCH] builtin/init-db: preemptively clear repo_fmt to avoid leaks Andrzej Hunt via GitGitGadget
2021-05-05 19:28 ` Johannes Schindelin [this message]
2021-05-06 5:40 ` Andrzej Hunt
2021-05-06 14:00 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.2105052125452.50@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=ajrhunt@google.com \
--cc=andrzej@ahunt.org \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=hanwen@google.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).