From: Andreas Schwab <schwab@linux-m68k.org>
To: David Turner <dturner@twopensource.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, David Turner <dturner@twitter.com>
Subject: Re: [PATCH v4 1/2] refs.c: optimize check_refname_component()
Date: Sun, 01 Jun 2014 09:17:20 +0200 [thread overview]
Message-ID: <m2k391drpb.fsf@linux-m68k.org> (raw)
In-Reply-To: <1401599865-14117-1-git-send-email-dturner@twitter.com> (David Turner's message of "Sun, 1 Jun 2014 01:17:44 -0400")
David Turner <dturner@twopensource.com> writes:
> +static unsigned char refname_disposition[] = {
> + 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
> + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
> + 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 2, 1,
> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9,
> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 9, 0,
> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 9, 9
> +};
> + unsigned char ch = (unsigned char) *cp;
> + char disp = refname_disposition[ch];
Undefined behaviour.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2014-06-01 7:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 5:17 [PATCH v4 1/2] refs.c: optimize check_refname_component() David Turner
2014-06-01 5:17 ` [PATCH v4 2/2] refs.c: SSE4.2 optimizations for check_refname_component David Turner
2014-06-01 7:17 ` Andreas Schwab [this message]
2014-06-01 19:43 ` [PATCH v4 1/2] refs.c: optimize check_refname_component() Philip Oakley
2014-06-01 20:50 ` Michael Haggerty
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=m2k391drpb.fsf@linux-m68k.org \
--to=schwab@linux-m68k.org \
--cc=dturner@twitter.com \
--cc=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).