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

Re: A little mystery - crash caused by empty commit message.

From
Tor Arvid Lund <torarvid@gmail.com>
Date
Feb 10, 2009, 12:58 UTC
Message-ID
<1a6be5fa0902100458w246f2bfeu5c0c303d18d17a3b@mail.gmail.com>
In-Reply-To
<20090210113234.GE12089@coredump.intra.peff.net>
On Tue, Feb 10, 2009 at 12:32 PM, Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> Are you sure it's truly an _empty_ commit message? Can you try
>
>  git cat-file commit f67f77edf06bbcebabf430735c751245a4b70f14
>
> and look at the result with xxd, hd, or similar.

Cool. You are correct. It is not empty after all. I ran git cat-file on that commit, and on the "same" commit on the branch where I did not see the problem. The correct one looks like:

<start> tree c5d2063a9b21de1f84240e4b9c0e40a44f0357b6 parent 6d109492008c68d28af821b96b82f807f338caf6 author Tor Arvid Lund <toral@qsystems.no> 1233852429 +0100 committer Tor Arvid Lund <toral@qsystems.no> 1233852429 +0100

[HIA] Log exception when serializing fails.

[git-p4: depot-paths = "//Heads/Dev/MarkII/Main/": change = 19233] <stop>

So - after the "+0100" on the committer line, hd tells me (as expected) that I have 0a 0a before "[HIA]". On the "faulty" commit I, for some reason, have 0a 00 instead. I do not understand why, but I guess strchr will return NULL when "\0[HIA]....." is passed to it, and segfault on the next iteration.

So - I am no closer to understanding what got me to this state, but your reply was helpful anyway, thanks :-)

-Tor Arvid-
Previous: Johannes SixtNext: Jeff King
Message 4 of 6 in “A little mystery - crash caused by empty commit message.”
  1. Tor Arvid LundFeb 10, 2009
  2. Jeff KingFeb 10, 2009
  3. Johannes SixtFeb 10, 2009
  4. Tor Arvid LundFeb 10, 2009
  5. Jeff KingFeb 10, 2009
  6. Tor Arvid LundFeb 16, 2009

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.