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

Re: Segfault in master due to 4fbcca4eff

From
Jeff King <peff@peff.net>
Date
Sep 21, 2018, 23:45 UTC
Message-ID
<20180921234543.GA3412@sigill.intra.peff.net>
In-Reply-To
<87lg7ujuc2.fsf@evledraar.gmail.com>
On Sat, Sep 22, 2018 at 01:37:17AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 30 quoted lines
> > Thanks, both of you ;-).  I was aware of the issue and proposed fix
> > but forgot about it when merging things down to 'master'.  Sorry
> > about that.
> 
> Just a follow-up question, in your merge commit you just pushed to
> "next" you say:
> 
>     Recent update broke the reachability algorithm when tags pointing
>     at objects that are not commit were involved, which has been fixed.
> 
> And in Derrick's commit message it says:
> 
>     [...]but incorrectly assumed that all objects provided were commits[...]
> 
> I just wanted to double check (without having the time to dig myself at
> this point) whether this bug was understood & tested for, or whether the
> case I had was just /also/ fixed for unexpected reasons.
> 
> I.e. in my upthread test case I have two annotated tags pointing at
> commits, whereas the merge to "next" says "when tags pointing at objects
> that are not commit were involved", which I I assume means say annotated
> tags pointing at blobs..., but that's not what I had.
> 
> Wasn't this just a bug fix that had nothing to do with tags not pointing
> to commits, but just ones where we had the simple case of tags pointing
> to commits, but they just weren't peeled?
> 
> I'm hoping for a "Junio skimmed the fix and wrote a merge message that
> wasn't quite accurate" here, but maybe that's not the case and something
> might be missing (e.g. missing test code).

I think it's a combination of the merge message being slightly inaccurate, and you slightly misreading it. :)

I think by "tags pointing", Junio meant "tag refs". Which of course, often point at tag objects, but can also point at trees, etc.

But the problem is not limited to tag refs. I think it's a problem with any "want" that is a non-commit. So really any ref pointing to a non-commit is a problem. But of course tags are the likely way for that to happen, since refs/heads is generally limited to commits.

So in short, yeah, the bug was triggered by fetching any annotated tag.
-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 8 of 15 in “What's cooking in git.git (Sep 2018, #04; Thu, 20)”
  1. Junio C HamanoSep 21, 2018
  2. Segfault in master due to 4fbcca4effÆvar Arnfjörð Bjarmason, Sep 21, 2018
  3. Derrick StoleeSep 21, 2018
  4. Ævar Arnfjörð BjarmasonSep 21, 2018
  5. Derrick StoleeSep 21, 2018
  6. Junio C HamanoSep 21, 2018
  7. Ævar Arnfjörð BjarmasonSep 21, 2018
  8. Jeff KingSep 21, 2018
  9. Ævar Arnfjörð BjarmasonSep 21, 2018
  10. Johannes SixtSep 21, 2018
  11. Junio C HamanoSep 21, 2018
  12. Paul-Sebastian UngureanuSep 23, 2018
  13. René ScharfeOct 1, 2018
  14. Jeff KingOct 1, 2018
  15. René ScharfeOct 1, 2018

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.