This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] Detect EOL on-the-fly in strstr, strcasestr and memmem.


On Wed, May 30, 2012 at 2:10 AM, Maxim Kuvyrkov <maxim@codesourcery.com> wrote:
> [PATCH 2/4] Detect EOL on-the-fly in strstr, strcasestr and memmem.
>
> --
> Maxim Kuvyrkov
> CodeSourcery / Mentor Graphics
>
>
>         [BZ #11607]
>         * string/str-two-way.h (AVAILABLE1, AVAILABLE2, RET0_IF_0): New macros,
>         define their defaults.
>         (two_way_short_needle): Detect end-of-string on-the-fly.
>         * string/strcasestr.c, string/strstr.c (AVAILABLE): Update.
>         (AVAILABLE1, AVAILABLE2, RET0_IF_0, AVAILABLE_USES_J): Define.
>         * string/bug-strcasestr1.c: New test.
>         * string/Makefile: Run it.

This caused:

http://www.sourceware.org/bugzilla/show_bug.cgi?id=14602

I created hjl/pr14602 branch to add a testcase. On x86-64,
I got

/export/build/gnu/glibc/build-x86_64-linux/string/test-strstr: Wrong
result in function simple_strstr , enable_shared,  (null)
/export/build/gnu/glibc/build-x86_64-linux/string/test-strstr-ifunc:
Wrong result in function simple_strstr , enable_shared,  (null)
/export/build/gnu/glibc/build-x86_64-linux/string/test-strstr-ifunc:
Wrong result in function __strstr_sse2 , enable_shared,  (null)

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]