mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Fix segmentation fault in strncasecmp for i686
2012-08-15 Liubov Dmitrieva <liubov.dmitrieva@gmail.com> [BZ #14195] * sysdeps/i386/i686/multiarch/strcmp-sssse3.S: Fix segmentation fault for a case of two empty input strings. * string/test-strncasecmp.c (check1): Renamed to... (bz12205): ...this. (bz14195): Add new testcase for two empty input strings and N > 0. (test_main): Call new testcase, adapt for renamed function.
This commit is contained in:
committed by
Andreas Jaeger
parent
9c55864e0d
commit
b3f479a85a
@ -1,5 +1,5 @@
|
||||
/* Test and measure strncasecmp functions.
|
||||
Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
||||
|
||||
@ -251,9 +251,9 @@ do_random_tests (void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Regression test for BZ #12205 */
|
||||
static void
|
||||
check1 (void)
|
||||
bz12205 (void)
|
||||
{
|
||||
static char cp [4096+16] __attribute__ ((aligned(4096)));
|
||||
static char gotrel[4096] __attribute__ ((aligned(4096)));
|
||||
@ -270,6 +270,15 @@ check1 (void)
|
||||
check_result (impl, s1, s2, n, exp_result);
|
||||
}
|
||||
|
||||
/* Regression test for BZ #14195 */
|
||||
static void
|
||||
bz14195 (void)
|
||||
{
|
||||
const char *empty_string = "";
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
check_result (impl, empty_string, "", 5, 0);
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
@ -277,7 +286,8 @@ test_main (void)
|
||||
|
||||
test_init ();
|
||||
|
||||
check1 ();
|
||||
bz12205 ();
|
||||
bz14195 ();
|
||||
|
||||
printf ("%23s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
|
Reference in New Issue
Block a user