This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12019] memchr overshoots on Alpha
- From: "eblake at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 14 Sep 2010 21:31:38 -0000
- Subject: [Bug libc/12019] memchr overshoots on Alpha
- References: <20100914154213.12019.eblake@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From eblake at redhat dot com 2010-09-14 21:31 -------
Richard, I compiled patch 4980 on Alpha, and ran it through gnulib's testsuite;
it still fails for the same reason:
0x000000012000095c in ldq_u (s=2199023419392) at ../../gltests/test-memchr.c:28
28 return *(const word *)(s & -8);
(gdb) bt
#0 0x000000012000095c in ldq_u (s=2199023419392)
at ../../gltests/test-memchr.c:28
#1 0x0000000120000a38 in memchr1 (xs=0x20000027fff, xc=85, n=2)
at ../../gltests/test-memchr.c:62
#2 0x0000000120001948 in main () at ../../gltests/test-memchr.c:298
57 if (unlikely (n <= 8))
58 {
59 /* Tweak the standard unaligned quadword load sequence by issuing
60 the second ldq_u at (s + n - 1) instead of (s + 8 - 1). This
61 avoids crossing a page boundary when S+N doesn't. */
62 word last = extqh (ldq_u (s + n - 1), s);
63 word first = extql (current, s);
In other words, s+n-1 might STILL validly cross a page boundary, in the case
where n is an over-estimate.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=12019
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.