git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t5702 failing under ASan on master

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 31, 2019, 18:12 UTC
Message-ID
<xmqqsgx83ddx.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190130114016.GD24387@genre.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 22 quoted lines
> 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.
Thanks, both.
Previous: brian m. carlsonNext: brian m. carlson
Message 4 of 13 in “t5702 failing under ASan on master”
  1. brian m. carlsonJan 30, 2019
  2. Duy NguyenJan 30, 2019
  3. brian m. carlsonJan 30, 2019
  4. Junio C HamanoJan 31, 2019
  5. fetch-pack: clear alternate shallow when completebrian m. carlson, Feb 4, 2019
  6. Duy NguyenFeb 4, 2019
  7. Jonathan TanFeb 5, 2019
  8. brian m. carlsonFeb 6, 2019
  9. fetch-pack: clear alternate shallow when completebrian m. carlson, Feb 6, 2019
  10. Duy NguyenFeb 7, 2019
  11. Junio C HamanoFeb 7, 2019
  12. Junio C HamanoFeb 7, 2019
  13. brian m. carlsonFeb 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.