Magellan Linux

Annotation of /trunk/glibc/patches/glibc-2.16.0-strncasecmp-segfault.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1925 - (hide annotations) (download)
Sun Oct 28 19:05:24 2012 UTC (11 years, 6 months ago) by niro
File size: 1556 byte(s)
-more glibc-2.16 fixes
1 niro 1925 diff --git a/string/test-strncasecmp.c b/string/test-strncasecmp.c
2     index 6c17530..acfe668 100644
3     --- a/string/test-strncasecmp.c
4     +++ b/string/test-strncasecmp.c
5     @@ -1,5 +1,5 @@
6     /* Test and measure strncasecmp functions.
7     - Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
8     + Copyright (C) 1999-2012 Free Software Foundation, Inc.
9     This file is part of the GNU C Library.
10     Written by Jakub Jelinek <jakub@redhat.com>, 1999.
11    
12     @@ -251,9 +251,9 @@ do_random_tests (void)
13     }
14     }
15    
16     -
17     +/* Regression test for BZ #12205 */
18     static void
19     -check1 (void)
20     +bz12205 (void)
21     {
22     static char cp [4096+16] __attribute__ ((aligned(4096)));
23     static char gotrel[4096] __attribute__ ((aligned(4096)));
24     @@ -270,6 +270,15 @@ check1 (void)
25     check_result (impl, s1, s2, n, exp_result);
26     }
27    
28     +/* Regression test for BZ #14195 */
29     +static void
30     +bz14195 (void)
31     +{
32     + const char *empty_string = "";
33     + FOR_EACH_IMPL (impl, 0)
34     + check_result (impl, empty_string, "", 5, 0);
35     +}
36     +
37     int
38     test_main (void)
39     {
40     @@ -277,7 +286,8 @@ test_main (void)
41    
42     test_init ();
43    
44     - check1 ();
45     + bz12205 ();
46     + bz14195 ();
47    
48     printf ("%23s", "");
49     FOR_EACH_IMPL (impl, 0)
50     diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
51     index 5e6321e..9735ad0 100644
52     --- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
53     +++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
54     @@ -2445,7 +2445,7 @@ L(less16bytes_sncmp):
55     # endif
56     jne L(neq_sncmp)
57     test %cl, %cl
58     - je L(eq)
59     + je L(eq_sncmp)
60    
61     cmp $1, REM
62     je L(eq_sncmp)
63     --
64     1.7.3.4