This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12092] strstr broken for some inputs on pre-SSE4 machines
- From: "ian at airs dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 5 Oct 2010 18:17:52 +0000
- Subject: [Bug libc/12092] strstr broken for some inputs on pre-SSE4 machines
- Auto-submitted: auto-generated
- References: <bug-12092-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12092
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ian at airs dot com
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> 2010-10-05 18:17:44 UTC ---
I think the problem is the Boyer-Moore shift in two_way_long_needle in
str-two-way.h. It does not correctly update MEMORY. I think we need something
like
if (memory && shift < period)
{
/* Since needle is periodic, but the last period has
a byte out of place, there can be no match until
after the mismatch. */
shift = needle_len - period;
memory = 0;
}
else if (memory > shift)
memory = memory - shift;
else
memory = 0;
--
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.