{"thread":{"id":"12502","subject":"git-log segfault on 00 graft","startedAt":"2008-03-04T18:57:42Z","lastAt":"2008-03-05T12:43:31Z","messageCount":5,"participants":["Jan Engelhardt","Johannes Schindelin","Shawn O. Pearce","Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70984","messageId":"Pine.LNX.4.64.0803041954320.7660@fbirervta.pbzchgretzou.qr","threadId":"12502","inReplyTo":null,"subject":"git-log segfault on 00 graft","fromName":"Jan Engelhardt","fromEmail":"jengelh@computergmbh.de","sentAt":"2008-03-04T18:57:42Z","receivedAt":"2008-03-04T18:57:42Z","isPatch":false,"sender":{"key":"jengelh@computergmbh.de","avatar":null},"body":"Hi,\n\n\nI was playing a bit with grafts, and actually did this:\n\n  echo '839affa3313011da783b5b8074a5c9805ee8503a \n0000000000000000000000000000000000000000' >.git/info/grafts\n\nrunning `git log --topo-order` causes a segfault. Yes, I probably \n\"should not be doing that\", but I think it at least should not\nsegfault.\n"},{"id":"70985","messageId":"alpine.LSU.1.00.0803041908210.22527@racer.site","threadId":"12502","inReplyTo":"Pine.LNX.4.64.0803041954320.7660@fbirervta.pbzchgretzou.qr","subject":"Re: git-log segfault on 00 graft","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-04T19:09:15Z","receivedAt":"2008-03-04T19:09:15Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 4 Mar 2008, Jan Engelhardt wrote:\n\n> I was playing a bit with grafts, and actually did this:\n> \n>   echo '839affa3313011da783b5b8074a5c9805ee8503a \n> 0000000000000000000000000000000000000000' >.git/info/grafts\n> \n> running `git log --topo-order` causes a segfault. Yes, I probably \n> \"should not be doing that\", but I think it at least should not\n> segfault.\n\nWell, I agree with the first, but not the latter.  grafts are a really \ncore and plumbing thing, and if you set it to something nonsensical, I \nthink you should expect something like a segmentation fault.\n\nCiao,\nDscho\n\n"},{"id":"71024","messageId":"20080305050630.GX8410@spearce.org","threadId":"12502","inReplyTo":"alpine.LSU.1.00.0803041908210.22527@racer.site","subject":"Re: git-log segfault on 00 graft","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-05T05:06:30Z","receivedAt":"2008-03-05T05:06:30Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Tue, 4 Mar 2008, Jan Engelhardt wrote:\n> \n> > I was playing a bit with grafts, and actually did this:\n> > \n> >   echo '839affa3313011da783b5b8074a5c9805ee8503a \n> > 0000000000000000000000000000000000000000' >.git/info/grafts\n> > \n> > running `git log --topo-order` causes a segfault. Yes, I probably \n> > \"should not be doing that\", but I think it at least should not\n> > segfault.\n> \n> Well, I agree with the first, but not the latter.  grafts are a really \n> core and plumbing thing, and if you set it to something nonsensical, I \n> think you should expect something like a segmentation fault.\n\nI'm sorry, I don't know where you learned to program Dscho, but\nmy mentors always taught me that user input should be handled\nwith care, and SIGSEGV / SIGBUS / SIGILL is not handling with\ncare!\n\nWe tell users to popuate the .git/info/grafts file.  By hand.\nIts user input.  We shouldn't segfault over a malformed entry.\n\n-- \nShawn.\n"},{"id":"71027","messageId":"20080305052749.GA23511@atjola.homenet","threadId":"12502","inReplyTo":"Pine.LNX.4.64.0803041954320.7660@fbirervta.pbzchgretzou.qr","subject":"Re: git-log segfault on 00 graft","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-03-05T05:27:49Z","receivedAt":"2008-03-05T05:27:49Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.03.04 19:57:42 +0100, Jan Engelhardt wrote:\n> Hi,\n> \n> \n> I was playing a bit with grafts, and actually did this:\n> \n>   echo '839affa3313011da783b5b8074a5c9805ee8503a \n> 0000000000000000000000000000000000000000' >.git/info/grafts\n> \n> running `git log --topo-order` causes a segfault. Yes, I probably \n> \"should not be doing that\", but I think it at least should not\n> segfault.\n\nerror: Could not read 0000000000000000000000000000000000000000\nfatal: revision walk setup failed\n\nThat's what I get with a somewhat up-to-date version from master.\n\nBjörn\n"},{"id":"71069","messageId":"alpine.LSU.1.00.0803051335440.4448@racer.site","threadId":"12502","inReplyTo":"20080305050630.GX8410@spearce.org","subject":"Re: git-log segfault on 00 graft","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-05T12:43:31Z","receivedAt":"2008-03-05T12:43:31Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 5 Mar 2008, Shawn O. Pearce wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > On Tue, 4 Mar 2008, Jan Engelhardt wrote:\n> > \n> > > I was playing a bit with grafts, and actually did this:\n> > > \n> > >   echo '839affa3313011da783b5b8074a5c9805ee8503a \n> > > 0000000000000000000000000000000000000000' >.git/info/grafts\n> > > \n> > > running `git log --topo-order` causes a segfault. Yes, I probably \n> > > \"should not be doing that\", but I think it at least should not \n> > > segfault.\n> > \n> > Well, I agree with the first, but not the latter.  grafts are a really \n> > core and plumbing thing, and if you set it to something nonsensical, I \n> > think you should expect something like a segmentation fault.\n> \n> I'm sorry, I don't know where you learned to program Dscho, but my \n> mentors always taught me that user input should be handled with care, \n> and SIGSEGV / SIGBUS / SIGILL is not handling with care!\n\nI agree.\n\n> We tell users to popuate the .git/info/grafts file.  By hand.\n> Its user input.  We shouldn't segfault over a malformed entry.\n\nWell, I disagree about the user input.  .git/info/grafts can break tons of \nthings, just by _existing_.  So you definitely need to know what you are \ndoing.\n\nJust inserting random strings into the grafts file is not an option. It is \nnot something that we should take pains to catch... just like a Unix \nsystem does not prevent \"rm -rf /\" as root.\n\nSo again, I do think that a segmentation fault is not good.  But I \ndisagree that you have to go to great lengths to prevent a segmentation \nfault when a user is fiddling with internals without even knowing what \ncould happen.\n\nIOW in this case, the _user input_ would have better been crafted with \ncare, and it was clearly not.\n\nBut as has been pointed out, the segfault has been already fixed (most \nlikely by one of Martin's patches), so the discussion about this \nparticular problem is moot.\n\nCiao,\nDscho\n\n"}]}