From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Jonathan Tan <jonathantanmy@google.com>
Subject: Re: t5702 failing under ASan on master
Date: Wed, 30 Jan 2019 11:40:16 +0000 [thread overview]
Message-ID: <20190130114016.GD24387@genre.crustytoothpaste.net> (raw)
In-Reply-To: <CACsJy8AVoETLkB5rLft27Rz7V9xPFN9fk=8g9-fCR61fVi4vjw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
On Wed, Jan 30, 2019 at 05:07:20PM +0700, Duy Nguyen wrote:
> If I understand ASan report correctly alternate_shallow_file memory is
> already gone after the first fetch, when we update the shallow file.
> But we're doing two fetches in the same process (the tag backfill
> thingy), the second fetch reuses the dangling alternate_shallow_file
> pointer and ASan caught it. Resetting the variable seems like the
> right way to go.
Ah, I think I was missing the fact that we're doing a tag backfill. That
explains a lot.
> But should we reset it to an empty string? We would pass
> "--shallow-file=" to "git index-pack", which is treated as "no shallow
> file" (i.e. complete repo). This sounds wrong because this is still a
> shallow repository.
>
> I suppose setting alternate_shallow_file to NULL would be ok. "git
> index-pack" will just go back to reading $GIT_DIR/info/shallow, which
> has been updated and contains correct info.
Yeah, that sounds like a better choice. I'll send a complete patch which
does this.
> PS. No idea how ASan blames your series for this. Yeah maybe memory
> layout and stuff. But it does spot a real problem.
I don't doubt this is a problem. We'll definitely want to fix it before
the release, since if I see it in development, somebody will likely see
it in production.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
next prev parent reply other threads:[~2019-01-30 11:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 8:58 t5702 failing under ASan on master brian m. carlson
2019-01-30 10:07 ` Duy Nguyen
2019-01-30 11:40 ` brian m. carlson [this message]
2019-01-31 18:12 ` Junio C Hamano
2019-02-04 0:06 ` [PATCH] fetch-pack: clear alternate shallow when complete brian m. carlson
2019-02-04 10:34 ` Duy Nguyen
2019-02-05 16:26 ` Jonathan Tan
2019-02-06 23:26 ` brian m. carlson
2019-02-06 23:59 ` [PATCH v2] " brian m. carlson
2019-02-07 2:32 ` Duy Nguyen
2019-02-07 2:47 ` Junio C Hamano
2019-02-07 2:53 ` Junio C Hamano
2019-02-07 4:07 ` brian m. carlson
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=20190130114016.GD24387@genre.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=pclouds@gmail.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 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).