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-