* git-log segfault on 00 graft @ 2008-03-04 18:57 Jan Engelhardt 2008-03-04 19:09 ` Johannes Schindelin 2008-03-05 5:27 ` Björn Steinbrink 0 siblings, 2 replies; 5+ messages in thread From: Jan Engelhardt @ 2008-03-04 18:57 UTC (permalink / raw) To: git Hi, 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-log segfault on 00 graft 2008-03-04 18:57 git-log segfault on 00 graft Jan Engelhardt @ 2008-03-04 19:09 ` Johannes Schindelin 2008-03-05 5:06 ` Shawn O. Pearce 2008-03-05 5:27 ` Björn Steinbrink 1 sibling, 1 reply; 5+ messages in thread From: Johannes Schindelin @ 2008-03-04 19:09 UTC (permalink / raw) To: Jan Engelhardt; +Cc: git Hi, 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. Ciao, Dscho ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-log segfault on 00 graft 2008-03-04 19:09 ` Johannes Schindelin @ 2008-03-05 5:06 ` Shawn O. Pearce 2008-03-05 12:43 ` Johannes Schindelin 0 siblings, 1 reply; 5+ messages in thread From: Shawn O. Pearce @ 2008-03-05 5:06 UTC (permalink / raw) To: Johannes Schindelin; +Cc: Jan Engelhardt, git Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-log segfault on 00 graft 2008-03-05 5:06 ` Shawn O. Pearce @ 2008-03-05 12:43 ` Johannes Schindelin 0 siblings, 0 replies; 5+ messages in thread From: Johannes Schindelin @ 2008-03-05 12:43 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Jan Engelhardt, git Hi, On Wed, 5 Mar 2008, Shawn O. Pearce wrote: > Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > > 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! I agree. > We tell users to popuate the .git/info/grafts file. By hand. > Its user input. We shouldn't segfault over a malformed entry. Well, I disagree about the user input. .git/info/grafts can break tons of things, just by _existing_. So you definitely need to know what you are doing. Just inserting random strings into the grafts file is not an option. It is not something that we should take pains to catch... just like a Unix system does not prevent "rm -rf /" as root. So again, I do think that a segmentation fault is not good. But I disagree that you have to go to great lengths to prevent a segmentation fault when a user is fiddling with internals without even knowing what could happen. IOW in this case, the _user input_ would have better been crafted with care, and it was clearly not. But as has been pointed out, the segfault has been already fixed (most likely by one of Martin's patches), so the discussion about this particular problem is moot. Ciao, Dscho ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-log segfault on 00 graft 2008-03-04 18:57 git-log segfault on 00 graft Jan Engelhardt 2008-03-04 19:09 ` Johannes Schindelin @ 2008-03-05 5:27 ` Björn Steinbrink 1 sibling, 0 replies; 5+ messages in thread From: Björn Steinbrink @ 2008-03-05 5:27 UTC (permalink / raw) To: Jan Engelhardt; +Cc: git On 2008.03.04 19:57:42 +0100, Jan Engelhardt wrote: > Hi, > > > 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. error: Could not read 0000000000000000000000000000000000000000 fatal: revision walk setup failed That's what I get with a somewhat up-to-date version from master. Björn ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-05 12:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-03-04 18:57 git-log segfault on 00 graft Jan Engelhardt 2008-03-04 19:09 ` Johannes Schindelin 2008-03-05 5:06 ` Shawn O. Pearce 2008-03-05 12:43 ` Johannes Schindelin 2008-03-05 5:27 ` Björn Steinbrink
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox