[Bug string/25933] New: Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

classic Classic list List threaded Threaded
37 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] New: Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

            Bug ID: 25933
           Summary: Off by one error in __strncmp_avx2 when
                    length=VEC_SIZE*4 and strings are at page boundaries
                    can cause a segfault
           Product: glibc
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: string
          Assignee: unassigned at sourceware dot org
          Reporter: dpmendenhall at gmail dot com
  Target Milestone: ---

Created attachment 12507
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12507&action=edit
report

When the two strings being compared are at the end of their pages,
__strncmp_avx2 will fall back to a one-byte-at-a-time loop named
"cross_page_loop". This loop is incorrect if the length of the comparison
exactly matches VEC_SIZE*4, which is 128 on my machine.

Full report in attached pdf.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #1 from David Mendenhall <dpmendenhall at gmail dot com> ---
Created attachment 12508
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12508&action=edit
test case

I reduced the bug to a stand-alone test case, now attached.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
By extending your testing to check for more alignments and sizes:

  for (size_t s = 99; s <= 4 * VEC_SIZE; s++)
    for (size_t s1a = 31; s1a < 32; s1a++)
      for (size_t s2a = 30; s2a < 32; s2a++)
        {
          ret = strncmp (s1 + PAGE_SIZE - s - s1a,
                         s1 + PAGE_SIZE - s - s2a,
                         s);
          assert (ret == 0);
        }

It seems that another page cross also requires fixing:

580         xorl    %r8d, %r8d
581         /* If ECX > VEC_SIZE * 2, skip ECX - (VEC_SIZE * 2) bytes.  */
582         subl    $(VEC_SIZE * 2), %ecx
583         jle     1f
584         /* Skip ECX bytes.  */
585         shrq    %cl, %rdi
586         /* R8 has number of bytes skipped.  */
587         movl    %ecx, %r8d
588 1:
589         /* Before jumping back to the loop, set ESI to the number of
590            VEC_SIZE * 4 blocks before page crossing.  */
591         movl    $(PAGE_SIZE / (VEC_SIZE * 4) - 1), %esi
592
593         testq   %rdi, %rdi
594         je      L(back_to_loop)
595         tzcntq  %rdi, %rcx
596         addq    %r10, %rcx
597         /* Adjust for number of bytes skipped.  */

It should not jump back to loop if the ecx is negative (as some cases).

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |hjl.tools at gmail dot com
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-05-07

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

Leonardo Sandoval <lsg.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lsg.tools at gmail dot com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

Sunil Pandey <skpgkp2 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |skpgkp2 at gmail dot com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
There is a test case at

https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/pr25933/master

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #4 from Sunil Pandey <skpgkp2 at gmail dot com> ---
Created attachment 12601
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12601&action=edit
strncmp_avx2 patch for pr25933

Tested attached patch on

https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/pr25933/master

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sunil Pandey from comment #4)
> Created attachment 12601 [details]
> strncmp_avx2 patch for pr25933
>
> Tested attached patch on
>
> https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/pr25933/master

Looks good.  Please try this

diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S
b/sysdeps/x86_64/multiarch/strcmp-avx2.S
index 48d03a9f46..dabc3e7590 100644
--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
+++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
@@ -256,6 +256,11 @@ L(next_3_vectors):
   vpmovmskb %ymm0, %ecx
   testl %ecx, %ecx
   jne   L(return_3_vec_size)
+# ifdef USE_AS_STRNCMP
+  /* Check if VEC_SIZE * 4 already exceeded max compare count %r11 */
+  cmpq  $(VEC_SIZE * 4), %r11
+  jbe   L(zero)
+# endif
 L(main_loop_header):
   leaq  (VEC_SIZE * 4)(%rdi), %rdx
   movl  $PAGE_SIZE, %ecx

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #6 from Sunil Pandey <skpgkp2 at gmail dot com> ---
(In reply to H.J. Lu from comment #5)

> (In reply to Sunil Pandey from comment #4)
> > Created attachment 12601 [details]
> > strncmp_avx2 patch for pr25933
> >
> > Tested attached patch on
> >
> > https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/pr25933/master
>
> Looks good.  Please try this
>
> diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S
> b/sysdeps/x86_64/multiarch/strcmp-avx2.S
> index 48d03a9f46..dabc3e7590 100644
> --- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
> +++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
> @@ -256,6 +256,11 @@ L(next_3_vectors):
>    vpmovmskb %ymm0, %ecx
>    testl %ecx, %ecx
>    jne   L(return_3_vec_size)
> +# ifdef USE_AS_STRNCMP
> +  /* Check if VEC_SIZE * 4 already exceeded max compare count %r11 */
> +  cmpq  $(VEC_SIZE * 4), %r11
> +  jbe   L(zero)
> +# endif
>  L(main_loop_header):
>    leaq  (VEC_SIZE * 4)(%rdi), %rdx
>    movl  $PAGE_SIZE, %ecx

It fixes the issue on my setup as expected.

$ ./test-strncmp
                        simple_strncmp  stupid_strncmp  __strncmp_avx2
__strncmp_sse42 __strncmp_ssse3 __strncmp_sse2
$ echo $?
0

$ git diff
diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S
b/sysdeps/x86_64/multiarch/strcmp-avx2.S
index 48d03a9f46..84ffe2cd5c 100644
--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
+++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
@@ -256,6 +256,11 @@ L(next_3_vectors):
        vpmovmskb %ymm0, %ecx
        testl   %ecx, %ecx
        jne     L(return_3_vec_size)
+# ifdef USE_AS_STRNCMP
+        /* Check if VEC_SIZE * 4 already exceeded max compare count %r11 */
+       cmpq  $(VEC_SIZE * 4), %r11
+       jbe   L(zero)
+# endif
 L(main_loop_header):
        leaq    (VEC_SIZE * 4)(%rdi), %rdx
        movl    $PAGE_SIZE, %ecx

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sunil Pandey from comment #6)

> (In reply to H.J. Lu from comment #5)
> > (In reply to Sunil Pandey from comment #4)
> > > Created attachment 12601 [details]
> > > strncmp_avx2 patch for pr25933
> > >
> > > Tested attached patch on
> > >
> > > https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/pr25933/master
> >
> > Looks good.  Please try this
> >
> > diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > b/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > index 48d03a9f46..dabc3e7590 100644
> > --- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > +++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > @@ -256,6 +256,11 @@ L(next_3_vectors):
> >    vpmovmskb %ymm0, %ecx
> >    testl %ecx, %ecx
> >    jne   L(return_3_vec_size)
> > +# ifdef USE_AS_STRNCMP
> > +  /* Check if VEC_SIZE * 4 already exceeded max compare count %r11 */
> > +  cmpq  $(VEC_SIZE * 4), %r11
> > +  jbe   L(zero)
> > +# endif
> >  L(main_loop_header):
> >    leaq  (VEC_SIZE * 4)(%rdi), %rdx
> >    movl  $PAGE_SIZE, %ecx
>
> It fixes the issue on my setup as expected.
>
> $ ./test-strncmp
>                         simple_strncmp stupid_strncmp __strncmp_avx2
> __strncmp_sse42 __strncmp_ssse3 __strncmp_sse2
> $ echo $?
> 0
>

Did you run "make check"?

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #8 from Sunil Pandey <skpgkp2 at gmail dot com> ---
(In reply to H.J. Lu from comment #7)

> (In reply to Sunil Pandey from comment #6)
> > (In reply to H.J. Lu from comment #5)
> > > (In reply to Sunil Pandey from comment #4)
> > > > Created attachment 12601 [details]
> > > > strncmp_avx2 patch for pr25933
> > > >
> > > > Tested attached patch on
> > > >
> > > > https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/pr25933/master
> > >
> > > Looks good.  Please try this
> > >
> > > diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > > b/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > > index 48d03a9f46..dabc3e7590 100644
> > > --- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > > +++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
> > > @@ -256,6 +256,11 @@ L(next_3_vectors):
> > >    vpmovmskb %ymm0, %ecx
> > >    testl %ecx, %ecx
> > >    jne   L(return_3_vec_size)
> > > +# ifdef USE_AS_STRNCMP
> > > +  /* Check if VEC_SIZE * 4 already exceeded max compare count %r11 */
> > > +  cmpq  $(VEC_SIZE * 4), %r11
> > > +  jbe   L(zero)
> > > +# endif
> > >  L(main_loop_header):
> > >    leaq  (VEC_SIZE * 4)(%rdi), %rdx
> > >    movl  $PAGE_SIZE, %ecx
> >
> > It fixes the issue on my setup as expected.
> >
> > $ ./test-strncmp
> >                         simple_strncmp stupid_strncmp __strncmp_avx2
> > __strncmp_sse42 __strncmp_ssse3 __strncmp_sse2
> > $ echo $?
> > 0
> >
>
> Did you run "make check"?

yes. it fixes strncmp and no new failure.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sunil Pandey from comment #8)
>
> yes. it fixes strncmp and no new failure.

I got

FAIL: wcsmbs/test-wcsncmp

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #9)
> (In reply to Sunil Pandey from comment #8)
> >
> > yes. it fixes strncmp and no new failure.
>
> I got
>
> FAIL: wcsmbs/test-wcsncmp

Please rebase users/hjl/pr25933/master branch.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|hjl.tools at gmail dot com         |skpgkp2 at gmail dot com

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
I think L(loop_cross_page) block is incorrect.  Please compare it against
L(loop_cross_page) block in strcmp-sse2-unaligned.S.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
The bug is around

593         testq   %rdi, %rdi
594         je      L(back_to_loop)

At this point, there may be less than 4 vector length remaining:

Breakpoint 1, __strncmp_avx2 ()
    at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:594
594             je      L(back_to_loop)
(gdb) p $r11
$2 = 97
(gdb) next
303             vmovdqa (%rax), %ymm0
(gdb)
304             vmovdqa VEC_SIZE(%rax), %ymm3
(gdb)
305             VPCMPEQ (%rdx), %ymm0, %ymm4
(gdb)
306             VPCMPEQ VEC_SIZE(%rdx), %ymm3, %ymm1
(gdb)
307             VPMINU  %ymm0, %ymm4, %ymm4
(gdb)
308             VPMINU  %ymm3, %ymm1, %ymm1
(gdb)
309             vmovdqa (VEC_SIZE * 2)(%rax), %ymm2
(gdb)
310             VPMINU  %ymm1, %ymm4, %ymm0
(gdb)
311             vmovdqa (VEC_SIZE * 3)(%rax), %ymm3
(gdb)
312             VPCMPEQ (VEC_SIZE * 2)(%rdx), %ymm2, %ymm5
(gdb)
313             VPCMPEQ (VEC_SIZE * 3)(%rdx), %ymm3, %ymm6
(gdb)

Program received signal SIGSEGV, Segmentation fault.
__strncmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:313
313             VPCMPEQ (VEC_SIZE * 3)(%rdx), %ymm3, %ymm6
(gdb)

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
There are

L(loop_cross_page_2_vec):
        /* The first VEC_SIZE * 2 bytes match or are ignored.  */
        vmovdqu (VEC_SIZE * 2)(%rax, %r10), %ymm2
        vmovdqu (VEC_SIZE * 3)(%rax, %r10), %ymm3
        VPCMPEQ (VEC_SIZE * 2)(%rdx, %r10), %ymm2, %ymm5
        VPMINU  %ymm2, %ymm5, %ymm5
        VPCMPEQ (VEC_SIZE * 3)(%rdx, %r10), %ymm3, %ymm6
        VPCMPEQ %ymm7, %ymm5, %ymm5
        VPMINU  %ymm3, %ymm6, %ymm6
        VPCMPEQ %ymm7, %ymm6, %ymm6

        vpmovmskb %ymm5, %edi
        vpmovmskb %ymm6, %esi

        salq    $32, %rsi
        xorq    %rsi, %rdi

        xorl    %r8d, %r8d
        /* If ECX > VEC_SIZE * 2, skip ECX - (VEC_SIZE * 2) bytes.  */
        subl    $(VEC_SIZE * 2), %ecx
        jle     1f  
        /* Skip ECX bytes.  */
        shrq    %cl, %rdi
        /* R8 has number of bytes skipped.  */
        movl    %ecx, %r8d
1:
        /* Before jumping back to the loop, set ESI to the number of
           VEC_SIZE * 4 blocks before page crossing.  */
        movl    $(PAGE_SIZE / (VEC_SIZE * 4) - 1), %esi

        testq   %rdi, %rdi
        je      L(back_to_loop)

When this branch is taken, there are (VEC_SIZE * 4) + %r10 matching bytes
starting at %rax, which may be >= the maximum offset.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

Sunil Pandey <skpgkp2 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12601|0                           |1
        is obsolete|                            |

--- Comment #14 from Sunil Pandey <skpgkp2 at gmail dot com> ---
Created attachment 12610
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12610&action=edit
strncmp_avx2 patch.1 for pr25933

I ran glibc make check and all test pass with this patch.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug string/25933] Off by one error in __strncmp_avx2 when length=VEC_SIZE*4 and strings are at page boundaries can cause a segfault

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25933

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sunil Pandey from comment #14)
> Created attachment 12610 [details]
> strncmp_avx2 patch.1 for pr25933
>
> I ran glibc make check and all test pass with this patch.

You removed loop unrolling.  Please provide all relevant glibc micro
benchmarks data before and after your change.

--
You are receiving this mail because:
You are on the CC list for the bug.
12