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

Re: git log - crash and core dump

From
Jeff King <peff@peff.net>
Date
Apr 17, 2013, 18:02 UTC
Message-ID
<20130417180248.GA1839@sigill.intra.peff.net>
In-Reply-To
<516EE300.7020200@lsrfire.ath.cx>
On Wed, Apr 17, 2013 at 07:59:28PM +0200, René Scharfe wrote:
Show 10 quoted lines
> >What about sane_ident_split in builtin/commit.c? It explicitly rejects a
> >NULL date. The logic in determine_author_info is a little hard to follow
> >(it assembles the ident line with fmt_ident and then reparses it), but I
> >believe it should be catching a bogus line from "commit -c", or from
> >GIT_AUTHOR_DATE in the environment.
> 
> Right, so let's keep the NULLs and fix the individual cases.  A quick
> "git grep -W -e date_begin -e date_end -e tz_begin -e tz_end" reveals
> that there are only the ones we talked about: blame, pretty, commit
> and -- of course -- ident.  And only the first two need fixing.
Yes, that matches the list I came up with in February.

I think we also need to do something about "git cat-file -p", which does not use the split_ident_line parser (but has its own problems with the home-grown parser).

Show 6 quoted lines
> >As a side note, when determine_author_info sees a bogus ident, it
> >appears to just silently ignore it, which is probably a bad thing.
> >Shouldn't we by complaining?  Or am I mis-reading the code?
> 
> The code looks complicated, but I just tried it: fmt_ident() dies if
> you give it an invalid date.

It does seem like determine_author_info can be greatly simplified, but I haven't looked all that closely.

-Peff
Previous: René ScharfeNext: René Scharfe
Message 16 of 28 in “git log - crash and core dump”
  1. Ivan LyapunovApr 16, 2013
  2. Antoine PelisseApr 16, 2013
  3. René ScharfeApr 16, 2013
  4. Junio C HamanoApr 16, 2013
  5. René ScharfeApr 16, 2013
  6. Junio C HamanoApr 16, 2013
  7. Ivan LyapunovApr 17, 2013
  8. Ivan LyapunovApr 17, 2013
  9. John KeepingApr 17, 2013
  10. Ivan LyapunovApr 17, 2013
  11. Konstantin KhomoutovApr 17, 2013
  12. Junio C HamanoApr 17, 2013
  13. Jeff KingApr 17, 2013
  14. Junio C HamanoApr 17, 2013
  15. René ScharfeApr 17, 2013
  16. Jeff KingApr 17, 2013
  17. René ScharfeApr 17, 2013
  18. cat-file: print tags raw for "cat-file -p"Jeff King, Apr 17, 2013
  19. Eric SunshineApr 19, 2013
  20. pretty: handle broken commit headers gracefullyRené Scharfe, Apr 17, 2013
  21. blame: handle broken commit headers gracefullyRené Scharfe, Apr 17, 2013
  22. Jeff KingApr 17, 2013
  23. René ScharfeApr 17, 2013
  24. Junio C HamanoApr 17, 2013
  25. Jeff KingApr 18, 2013
  26. Antoine PelisseApr 16, 2013
  27. Jeff KingApr 16, 2013
  28. Ivan LyapunovApr 17, 2013

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.