From: Andrzej Hunt <andrzej@ahunt.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Andrzej Hunt via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Han-Wen Nienhuys <hanwen@google.com>,
Andrzej Hunt <ajrhunt@google.com>
Subject: Re: [PATCH] builtin/init-db: preemptively clear repo_fmt to avoid leaks
Date: Thu, 6 May 2021 07:40:13 +0200 [thread overview]
Message-ID: <79cd3791-bf6e-df3e-1045-c51801406905@ahunt.org> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2105052125452.50@tvgsbejvaqbjf.bet>
Hi Johannes,
On 05/05/2021 21:28, Johannes Schindelin wrote:
> 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):
Thanks for spotting that. On further investigation this looks like a
preexisting issue on seen (my github PR was based on seen - in hindsight
that was probably not a good idea) - here's a CI run from seen this
morning exhibiting the same failure:
https://github.com/git/git/runs/2515095446?check_suite_focus=true
To gain more confidence, I've rebased my patch onto next, and I no
longer hit any CI failures:
https://github.com/ahunt/git/runs/2515309312?check_suite_focus=true
(I ran this on my fork because changing the base branch appears to have
confused the PR's CI configuration.)
Nevertheless, I was still curious about what might be causing the
failure in the first place: it appears to only happen in CI with gcc on
Linux, and I was not able to repro on my machine using (tested with
gcc-7.5 and gcc-10, with seen from this morning):
make CC=gcc-10 T=t0410-partial-clone.sh test
I'm guessing that understanding this failure might require the help of
someone with an Ubuntu install to debug (unless there's some easy way of
using Github's Actions to run a bisect)?
-- snip --
ATB,
Andrzej
next prev parent reply other threads:[~2021-05-06 5:41 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
2021-05-06 5:40 ` Andrzej Hunt [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=79cd3791-bf6e-df3e-1045-c51801406905@ahunt.org \
--to=andrzej@ahunt.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=ajrhunt@google.com \
--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.
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.