All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/3] Using a bit more decoration
Date: Mon, 08 Apr 2013 21:37:18 -0700	[thread overview]
Message-ID: <7vobdotj41.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130409035126.GA17319@sigill.intra.peff.net> (Jeff King's message of "Mon, 8 Apr 2013 23:51:26 -0400")

Jeff King <peff@peff.net> writes:

> Neat. Reading through, I didn't notice anything obviously wrong with any
> of the patches (though there is one gcc warning, which I'll respond to
> separately).
>
> It does make me a little nervous to have code that almost never gets
> exercised (i.e., when indegree is really high, or a large number of
> encodings). It seems like a bug waiting to happen when somebody does hit
> that condition.

One round of work-in-progress code I had when you asked what I was
up to did have that off-by-one bug ;-)  set_indegree() had to spill
into the hash when storing 255 (i.e. exactly the value of LIMIT) but
I was spilling strting from 256, so an entry with 255 children looked
into the hash, finding nothing and said "I am done" X-<.

I haven't bothered to try the "more than 256 encodings", but with
the likely off-by-one in mind, I think I was being careful enough.

      parent reply	other threads:[~2013-04-09  4:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08  6:14 [PATCH 2/2] decorate: add "clear_decoration()" Junio C Hamano
2013-04-08 21:09 ` Jeff King
2013-04-08 21:22   ` Junio C Hamano
2013-04-08 23:01   ` [PATCH 0/3] Using a bit more decoration Junio C Hamano
2013-04-08 23:01     ` [PATCH 1/3] commit: shrink "indegree" field Junio C Hamano
2013-04-09  3:52       ` Jeff King
2013-04-08 23:01     ` [PATCH 2/3] commit: rename parse_commit_date() Junio C Hamano
2013-04-08 23:01     ` [PATCH 3/3] commit: add get_commit_encoding() Junio C Hamano
2013-04-09  3:51     ` [PATCH 0/3] Using a bit more decoration Jeff King
2013-04-09  4:17       ` Junio C Hamano
2013-04-09  4:39         ` Jeff King
2013-04-09  4:54           ` Junio C Hamano
2013-04-09  6:52             ` Jeff King
2013-04-09 20:06               ` Junio C Hamano
2013-04-09  4:37       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vobdotj41.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.