This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12123] SIGBUS on strstr_sse42 due to bad alignment
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 26 Oct 2010 06:46:14 +0000
- Subject: [Bug libc/12123] SIGBUS on strstr_sse42 due to bad alignment
- Auto-submitted: auto-generated
- References: <bug-12123-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12123
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-26 06:46:10 UTC ---
There are
static inline __m128i
__m128i_strloadu (const unsigned char * p)
{
int offset = ((size_t) p & (16 - 1));
if (offset && (int) ((size_t) p & 0xfff) > 0xff0)
{
__m128i a = _mm_load_si128 ((__m128i *) (p - offset));
__m128i zero = _mm_setzero_si128 ();
int bmsk = _mm_movemask_epi8 (_mm_cmpeq_epi8 (a, zero));
if ((bmsk >> offset) != 0)
return __m128i_shift_right (a, offset);
}
return _mm_loadu_si128 ((__m128i *) p);
}
It can load from unaligned address. I have no problems
with gcc 4.5.1 and glibc mainline on 32bit Intel Core i7.
What failures did you see with "make check" in glibc?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.