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: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 5 Oct 2010 17:08:33 +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
--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2010-10-05 17:08:33 UTC ---
Additional analysis from iant@google.com:
I'm not completely sure, but this is what I see so far. The bug can only occur
when the second argument to strstr (the needle) is periodic, which is to say
that it consists entirely of some repeated string. When that happens, the code
can fail to match if the first argument to strstr (the haystack) contains two
or more repetitions of the needle's periodic string, but not as many as the
number of occurrences as are in the needle. In that case strstr can sometimes
return a pointer to the smaller number of repetitions, when it should properly
return NULL or a later pointer. Also, the needle has to be 32 bytes or more.
--
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.