From: Junio C Hamano <junkio@cox.net>
To: Paul Mackerras <paulus@samba.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Wayne Scott <wsc9tt@gmail.com>,
git@vger.kernel.org
Subject: Re: git-diff-tree rename detection bug
Date: Thu, 15 Sep 2005 01:17:16 -0700 [thread overview]
Message-ID: <7vll1y9243.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 17192.65054.520959.454610@cargo.ozlabs.ibm.com
Paul Mackerras <paulus@samba.org> writes:
> The strlen() in glibc for ppc is unbearably clever hand-coded
> assembly, which loads up 8 bytes at a time (once it has the address
> 8-byte aligned), and does various ANDs and ORs and ADDs and
> conditional branches. If some of the 8 bytes aren't defined, it will
> in many cases branch one way or the other based on the undefined
> bytes, but end up computing the same result on either branch.
This reminds me of what I did in my previous life, writing a
memory allocation checker -- this was before Valgrind -- and
found out that strcpy in the C library that came with Solaris
had a similar clever trick. What was interesting was that
copying a string starting at the (PAGESIZE-3)th byte on a page
and NUL terminated at the end of the same page ended up
prefetching the first word from the next page (please do not ask
me about the details -- I do not remember the disassembly of
that part of the code anymore). It was not an inconvenience for
our memory checker but was a real bug -- the next page could
very well be unaccessible.
The bug was fixed in the next version of the C library when we
updated our Solaris box.
next prev parent reply other threads:[~2005-09-15 8:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 16:47 git-diff-tree rename detection bug Wayne Scott
2005-09-14 18:09 ` Junio C Hamano
2005-09-14 18:40 ` Wayne Scott
2005-09-14 20:24 ` Linus Torvalds
2005-09-14 20:41 ` Fix alloc_filespec() initialization Linus Torvalds
2005-09-15 2:23 ` git-diff-tree rename detection bug Paul Mackerras
2005-09-15 2:26 ` Paul Mackerras
2005-09-15 3:36 ` Linus Torvalds
2005-09-15 4:52 ` Paul Mackerras
2005-09-15 8:17 ` Junio C Hamano [this message]
2005-09-15 14:49 ` Josef Weidendorfer
2005-09-20 10:50 ` [Valgrind-developers] " Paul Mackerras
2005-09-15 3:29 ` Linus Torvalds
2005-09-16 5:59 ` Junio C Hamano
2005-09-15 5:58 ` H. Peter Anvin
2005-09-15 7:41 ` Junio C Hamano
2005-09-15 14:55 ` Linus Torvalds
2005-09-16 12:53 ` Matthias Urlichs
2005-09-15 20:57 ` Nicolas Pitre
2005-09-14 18:51 ` Junio C Hamano
[not found] ` <59a6e5830509141208282166c8@mail.gmail.com>
2005-09-14 19:19 ` Junio C Hamano
2005-09-14 20:53 ` Linus Torvalds
2005-09-14 21:55 ` Junio C Hamano
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=7vll1y9243.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@osdl.org \
--cc=wsc9tt@gmail.com \
/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).