Re: git-log segfault on 00 graft
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Mar 5, 2008, 05:06 UTC
- Message-ID
- <20080305050630.GX8410@spearce.org>
- In-Reply-To
- <alpine.LSU.1.00.0803041908210.22527@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 14 quoted lines
> On Tue, 4 Mar 2008, Jan Engelhardt wrote: > > > I was playing a bit with grafts, and actually did this: > > > > echo '839affa3313011da783b5b8074a5c9805ee8503a > > 0000000000000000000000000000000000000000' >.git/info/grafts > > > > running `git log --topo-order` causes a segfault. Yes, I probably > > "should not be doing that", but I think it at least should not > > segfault. > > Well, I agree with the first, but not the latter. grafts are a really > core and plumbing thing, and if you set it to something nonsensical, I > think you should expect something like a segmentation fault.
I'm sorry, I don't know where you learned to program Dscho, but my mentors always taught me that user input should be handled with care, and SIGSEGV / SIGBUS / SIGILL is not handling with care!
We tell users to popuate the .git/info/grafts file. By hand. Its user input. We shouldn't segfault over a malformed entry.
-- Shawn.