aboutsummaryrefslogtreecommitdiff
path: root/string
AgeCommit message (Collapse)AuthorFilesLines
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae121-121/+121
2013-12-23Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang.Brooks Moses2-4/+12
In the string/string.h and string/strings.h headers, we have a couple of macros that "tell the caller that we provide correct C++ prototypes" according to the comment; they are used to determine whether to wrap some prototypes in "extern "C++"" (and provide multiple overloads of them, and some other magic) when __cplusplus is defined. The macros are set to check for sufficiently-recent GCC versions (4.4 and later), but this is not the right check for non-GCC compilers. In particular, these macros should also be set when using Clang -- if they are not set, then Clang will be unable to correctly diagnose a number of subtle bugs that will be errors in GCC compilations. As per discussion on earlier versions of this patch, rather than restrict the fix to Clang per se, we assume that all C++ compilers that claim to fully support C++98 are using a standard-conforming C++ standard library, which seems pretty reasonable. Clang has been providing an appropriate value of __cplusplus since May 2012.
2013-12-13PowerPC: multiarch wordcopy for PowerPC64Adhemerval Zanella1-16/+20
2013-12-13PowerPC: multirach memcmp for PowerPC64Adhemerval Zanella1-1/+5
2013-12-06PowerPC: multiarch strchrnul for PowerPC32Adhemerval Zanella1-1/+5
2013-12-06PowerPC: multiarch rawmemchr for PowerPC32Adhemerval Zanella1-1/+4
2013-12-06PowerPC: multiarch memchr for PowerPC32Adhemerval Zanella1-1/+5
2013-12-06PowerPC: multiarch mempcpy for PowerPC32Adhemerval Zanella1-1/+5
2013-11-26Remove duplicate ifunc tests.Ondřej Bílka34-645/+1
2013-11-10Fix build on hurdSamuel Thibault1-0/+1
* string/strcoll_l.c: Include <sys/param.h> for MIN/MAX macros.
2013-10-04string/tester memrchr testAlan Modra1-3/+3
http://sourceware.org/ml/libc-alpha/2013-08/msg00095.html I found this useful at one stage when I was seeing a huge number of memrchr failures all of test number 10. * string/tester.c (test_memrchr): Increment reported test cycle.
2013-10-04string/test-memcpy error reportingAlan Modra1-2/+2
http://sourceware.org/ml/libc-alpha/2013-08/msg00094.html Using plain %s here runs the risk of segfaulting when displaying the string. src and dst aren't zero terminated strings. * string/test-memcpy.c (do_one_test): When reporting errors, print string address and don't overrun end of string.
2013-09-23Check for integer overflow in cache size computation in strcollSiddhesh Poyarekar3-1/+72
strcoll is implemented using a cache for indices and weights of collation sequences in the strings so that subsequent passes do not have to search through collation data again. For very large string inputs, the cache size computation could overflow. In such a case, use the fallback function that does not cache indices and weights of collation sequences. Fixes CVE-2012-4412.
2013-09-23Fall back to non-cached sequence traversal and comparison on malloc failSiddhesh Poyarekar1-31/+234
strcoll currently falls back to alloca if malloc fails, resulting in a possible stack overflow. This patch implements sequence traversal and comparison without caching indices and rules. Fixes CVE-2012-4424.
2013-09-20Make __ffs hiddenAndreas Schwab1-0/+1
2013-09-05Add memrchr testcaseAdhemerval Zanella3-1/+190
2013-08-27Fix missing declaration of LC_CTYPE nonascii-case elementAndreas Schwab3-8/+48
2013-08-20Simplify strcoll implementationSiddhesh Poyarekar1-406/+295
Break up strcoll into simpler functions so that the logic is easier to follow and maintain.
2013-06-26Add a test for BZ #15674H.J. Lu1-0/+24
2013-06-20Fix loop construction to functions callsAdhemerval Zanella4-0/+4
Check wheter the compiler has the option -fno-tree-loop-distribute-patterns to inhibit loop transformation to library calls and uses it on memset and memmove default implementation to avoid recursive calls.
2013-06-11Remove performance-related bits from string testsSiddhesh Poyarekar25-620/+0
2013-06-07Avoid use of "register" as optimization hint.Joseph Myers5-22/+22
2013-06-04Add copyright header to test-strchrnul.cSiddhesh Poyarekar1-0/+19
2013-05-16Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold1-1/+1
2013-05-01Remove duplicate __strcmp_cgOndrej Bilka1-24/+1
The __strcmp_cg code was duplicate of of __strcmp_gc. This patch unifies these two cases into one.
2013-02-17Sort Versions filesAndreas Jaeger1-2/+2
2013-02-15Remove bounded-pointers build system support.Joseph Myers1-4/+0
2013-02-15Remove miscellaneous bounded-pointers relics in C code.Joseph Myers1-1/+1
2013-02-14Remove bp-sym.h and BP_SYM uses from C code.Joseph Myers1-6/+1
2013-02-13Remove __ptrvalue, __bounded and __unbounded.Joseph Myers1-1/+1
2013-02-13Call memcpy in generic mempcpyOndrej Bilka1-36/+2
2013-02-12Fix typo, improve comment, remove superfluous #undefs, add missing #undef.Tom de Vries1-5/+7
2013-02-11Remove dead CFLAGS lines from string/MakefileTom de Vries1-2/+0
2013-02-08Remove dead variable in generic strcpy.Roland McGrath1-3/+0
2013-02-08Remove CHECK_BOUNDS_LOW and CHECK_BOUNDS_HIGH for C code.Joseph Myers1-5/+2
2013-02-07Remove lots of inline keywords.Roland McGrath1-3/+0
2013-01-11Remove __GLIBC_HAVE_LONG_LONG.Joseph Myers2-15/+9
2013-01-11Add --enable-hardcoded-path-in-tests configure optionH.J. Lu1-1/+1
2013-01-10Remove __GNUC__ conditions for "long long" from string.h and wchar.h.Joseph Myers1-2/+0
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers149-158/+149
2012-12-27BZ#14317: Optimze __xpg_strerror_r2012-12-27 Bruno Haible1-9/+15
[BZ #14317] * string/xpg-strerror.c (__xpg_strerror_r): Optimize, call strlen only if needed.
2012-11-06Use memcpy in memmove when possibleMaxim Kuvyrkov1-1/+5
2012-10-24Define and use $(run-built-tests).Joseph Myers1-1/+1
2012-10-19Add string IFUNC testsH.J. Lu60-23/+709
2012-10-19Add a testcase for BZ #14716H.J. Lu1-3/+32
2012-10-15Fix BZ #14716: memmem crashMaxim Kuvyrkov1-2/+2
2012-10-12Avoid PLT references from __get_clockfreq on powerpcAndreas Schwab1-1/+2
2012-10-11Framework to test IFUNC implementations on targetH.J. Lu1-1/+56
2012-10-11Use IFUNC memmove/memset in x86-64 bcopy/bzeroH.J. Lu5-15/+124
Also add separate tests for bcopy and bzero.
2012-10-08Fix BZ #14602: strstr and strcasestr return wrong result.Maxim Kuvyrkov3-18/+27