From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: bug found (Re: git-fast-export SIGSEGV on solaris + backtrace) Date: Thu, 03 Jul 2008 01:30:13 -0700 Message-ID: <7vk5g32wve.fsf@gitster.siamese.dyndns.org> References: <4869B91B.9000709@posdata.co.kr> <486C248E.4060205@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, Pieter de Bie To: namsh@posdata.co.kr X-From: git-owner@vger.kernel.org Thu Jul 03 14:08:54 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KENcL-0006M6-Kk for gcvg-git-2@gmane.org; Thu, 03 Jul 2008 14:08:54 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757436AbYGCMEb (ORCPT ); Thu, 3 Jul 2008 08:04:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757426AbYGCMEa (ORCPT ); Thu, 3 Jul 2008 08:04:30 -0400 Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:40145 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757409AbYGCME0 (ORCPT ); Thu, 3 Jul 2008 08:04:26 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 6E440CFAC; Thu, 3 Jul 2008 04:30:24 -0400 (EDT) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id CCA0ECFAB; Thu, 3 Jul 2008 04:30:20 -0400 (EDT) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 48521508-48DA-11DD-85FF-CE28B26B55AE-77302942!a-sasl-fastnet.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: SungHyun Nam writes: > And the code says it: > for (i = 0; i < idnums.size; ++i) { > deco++; > if (deco && deco->base && deco->base->type == 1) { > > The 'deco' should be post-incremented? or > Checking code should be (i < idnums.size - 1)? The variable "deco" is a pointer that walks over a hashtable from its offset 0 to its end, so it can never be NULL (well, the code increments before it tests the variable for NULLness, so it is clear that the test is bogus). What was I smoking when I applied df6a7ff (builtin-fast-export: Add importing and exporting of revision marks, 2008-06-11), I have to wonder... Thanks for the fix.