summaryrefslogtreecommitdiff
path: root/debug
AgeCommit message (Collapse)Author
2006-01-01Update copyright year.Ulrich Drepper
2005-12-14Moved to csu/errno-loc.c.Ulrich Drepper
2005-12-142005-12-13 Ulrich Drepper <drepper@redhat.com>Ulrich Drepper
2005-10-31Change backtrace+symbols_fd comment.Ulrich Drepper
2005-09-17[BZ #1053]Ulrich Drepper
* debug/xtrace.sh: Add missing escape character in -? match. Patch by Peter Breitenlohner <peb@mppmu.mpg.de>.
2005-08-22* stdlib/bits/stdlib.h (mbstowcs): Divide __bos (__dst) byUlrich Drepper
sizeof (wchar_t) rather than multiplying __len by sizeof (wchar_t). Pass __bos (__dst) / sizeof (wchar_t) to the *_chk routine. * wcsmbs/bits/wchar2.h (mbsrtowcs, mbsnrtowcs): Likewise. * debug/mbsnrtowcs_chk.c (__mbsnrtowcs_chk): Don't multiply len by sizeof (wchar_t). * debug/mbsrtowcs_chk.c (__mbsrtowcs_chk): Likewise. * debug/mbstowcs_chk.c (__mbstowcs_chk): Likewise. Fix type of SRC argument. Pass &SRC rather than SRC to __mbsrtowcs. * debug/wcstombs_chk.c (__wcstombs_chk): Pass &SRC rather than SRC to __wcsrtombs. * debug/tst-chk1.c: Include assert.h. (do_test): Change enough array from VLA into a fixed size array. Assert that MB_CUR_MAX is <= sizeof (enough). Use FAIL () macro instead of print error details. Add several new tests. Kill some unused variable warnings.
2005-08-20Add tests for mbstowcs and wcstombs.Ulrich Drepper
2005-08-09Add libc_hidden_def.Ulrich Drepper
2005-07-25* debug/mbstowcs_chk.c: New file.Ulrich Drepper
* debug/wcstombs_chk.c: New file. * debug/Makefile (routines): Add mbstowcs_chk and wcstombs_chk. * debug/Versions: Add __mbstowcs_chk and __wcstombs_chk. * stdlib/bits/stdlib.h: Add definitions for mbstowcs and wcstombs. * wcsmbs/bits/wchar2.h (mbsrtowcs): Pretty printing. * string/test-memset.c (test_main): Use negative byte value in
2005-07-21* wcsmbs/bits/wchar2.h (swprintf): Remove format argument.Ulrich Drepper
* debug/tst-chk1.c (do_test): Add test for swprintf with format being the last argument. 2005-07-21 Thorsten Kukuk <kukuk@suse.de> * debug/getgroups_chk.c (__getgroups_chk): Fix return value. * stdio-common/fxprintf.c: Include string.h.
2005-07-20* wcsmbs/bits/wchar2.h: Add definitions for wcrtomb, mbsrtowcs,Ulrich Drepper
wcsrtombs, mbsnrtowcs, and wcsnrtombs. * debug/Makefile (routines): Add wcrtomb_chk, mbsrtowcs_chk, wcsrtombs_chk, mbsnrtowcs_chk, and wcsnrtombs_chk. * debug/Versions: Add __wcrtomb_chk, __mbsrtowcs_chk, __wcsrtombs_chk, __mbsnrtowcs_chk, and __wcsnrtombs_chk. * debug/tst-chk1.c: Add tests for new functions. * debug/mbsnrtowcs_chk.c: New file. * debug/mbsrtowcs_chk.c: New file. * debug/wcrtomb_chk.c: New file. * debug/wcsnrtombs_chk.c: New file. * debug/wcsrtombs_chk.c: New file. * include/stdio.h: Add declaration for __fxprintf.
2005-07-18* nscd/grpcache.c (cache_addgr): Use correct maximum for group IDUlrich Drepper
length. Patch by Ivan Gyurdiev <ivg2@cornell.edu>. * debug/confstr_chk.c: New file. * debug/getdomainname_chk.c: New file. * debug/getgroups_chk.c: New file. * debug/gethostname_chk.c: New file. * debug/getlogin_r_chk.c: New file. * debug/ttyname_r_chk.c: New file. * posix/bits/unistd.h: Add definitions for new debug versions. * debug/tst-chk1.c: Add tests for new functions. * debug/Versions: Export new functions. * debug/Makefile (routines): Add new files. * stdlib/bits/stdlib.h: Fix typo. * manual/Makefile (libc/index.html): Depend on dir-add.texi.
2005-07-15Update.Andreas Jaeger
2005-07-15 Andreas Jaeger <aj@suse.de> * debug/Makefile (tst-lfschk3-ENV): New, set locale. (tst-lfschk2-ENV): New. (tst-lfschk1-ENV): New. (tst-chk3-ENV): New. (tst-chk2-ENV): New. (tst-chk1-ENV): New. * include/stdlib.h: Remove malloc attribute from __posix_memalign. * stdlib/stdlib.h: Likewise.
2005-07-15* wcsmbs/bits/wchar2.h: New file.Ulrich Drepper
* include/bits/wchar2.h: New file. * wcsmbs/wchar.h: Include <bits/wchar2.h> if fortification is requested. * wcsmbs/wcsncpy.c: Add __wcsncpy alias. * string/bits/string3.h: Add fortified stpncpy definitions. * sysdeps/generic/stpncpy_chk.c: New file. * libio/vswprintf.c: Move _IO_wstrnfile definition to strfile.h. Export _IO_wstrn_jumps. * libio/strfile.h: Define _IO_wstrnfile and declare _IO_wstrn_jumps. * include/wchar.h: Declare __wcsncpy and __vswprintf_chk. * debug/fgetws_chk.c: New file. * debug/fgetws_u_chk.c: New file. * debug/fwprintf_chk.c: New file. * debug/swprintf_chk.c: New file. * debug/vfwprintf_chk.c: New file. * debug/vswprintf_chk.c: New file. * debug/vwprintf_chk.c: New file. * debug/wcpcpy_chk.c: New file. * debug/wcpncpy_chk.c: New file. * debug/wcscat_chk.c: New file. * debug/wcscpy_chk.c: New file. * debug/wcsncat_chk.c: New file. * debug/wcsncpy_chk.c: New file. * debug/wmemcpy_chk.c: New file. * debug/wmemmove_chk.c: New file. * debug/wmempcpy_chk.c: New file. * debug/wmemset_chk.c: New file. * debug/wprintf_chk.c: New file. * debug/tst-chk1.c: Add tests for new functions. * debug/Versions: Export new functions. * debug/Makefile (routines): Add new functions.
2005-07-13* stdlib/bits/stdlib.h: New file.Ulrich Drepper
* stdlib/stdlib.h: Include <bits/stdlib.h> if fortification is requested. * Makefile (headers): Add bits/stdlib.h. * include/bits/stdlib.h: New file. * debug/Depend: New file. * debug/ptsname_r_chk.c: New file. * debug/realpath_chk.c: New file. * debug/wctomb_chk.c: New file. * debug/Makefile (routines): Add ptsname_r_chk, realpath_chk, and wctomb_chk. * debug/Versions: Export __ptsname_r_chk, __realpath_chk, and __wctomb_chk. * debug/tst-chk1.c: Add tests for __ptsname_r_chk, __realpath_chk, and __wctomb_chk.
2005-06-26* Versions.def (ld): Add GLIBC_2.4.Ulrich Drepper
* configure.in: Add --enable-stackguard-randomization option. (ENABLE_STACKGUARD_RANDOMIZE): New define. * config.h.in (ENABLE_STACKGUARD_RANDOMIZE): Add. * sysdeps/unix/sysv/linux/dl-osinfo.h: Include stdint.h. (_dl_setup_stack_chk_guard): New inline function. * sysdeps/generic/dl-osinfo.h: Include stdint.h. (_dl_setup_stack_chk_guard): New inline function. * elf/rtld.c (__stack_chk_guard): New variable. (dl_main): Remove all traces of TLS_INIT_TP_EXPENSIVE. Set __stack_chk_guard to _dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined. * elf/Versions (ld): Export __stack_chk_guard@@GLIBC_2.4. * sysdeps/generic/libc-start.c (__stack_chk_guard): New variable. (__libc_start_main): Set __stack_chk_guard to _dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Remove all traces of TLS_INIT_TP_EXPENSIVE. * debug/Versions (libc): Export __stack_chk_fail@@GLIBC_2.4. * debug/Makefile (routines): Add stack_chk_fail. (static-only-routines): Add stack_chk_fail_local. * debug/stack_chk_fail_local.c: New file. * debug/stack_chk_fail.c: New file. * elf/Makefile: Add rules to build and run tst-stackguard1{,-static} tests. * elf/tst-stackguard1.c: New file. * elf/tst-stackguard1-static.c: New file. * elf/stackguard-macros.h: New file.
2005-06-14* debug/pread64_chk.c: Use __libc_pread64 instead of __pread64.Ulrich Drepper
* sysdeps/posix/posix_fallocate64.c: Likewise. * include/string.h: Use libc_hidden_proto for strnlen. * sysdeps/generic/strnlen.c: Add libc_hidden_def. * include/libintl.h: Use libc_hidden_proto for __dcgettext. * intl/dcgettext.c: Add libc_hidden_def. * include/execinfo.h: Add libc_hidden_proto for __backtrace and __backtrace_symbols_fd. * sysdeps/generic/backtrace.c: Add libc_hidden_def. * sysdeps/generic/backtracesymsfd.c: Likewise. * sysdeps/generic/elf/backtracesymsfd.c: Likewise. * sysdeps/i386/backtrace.c: Likewise. * sysdeps/ia64/backtrace.c: Likewise. * sysdeps/powerpc/powerpc32/backtrace.c: Likewise. * sysdeps/powerpc/powerpc64/backtrace.c: Likewise. * sysdeps/s390/s390-32/backtrace.c: Likewise. * sysdeps/s390/s390-64/backtrace.c: Likewise.
2005-03-28(__builtin___memcpy_chk): Define away to Andreas Jaeger
avoid warnings with older compiler. (__builtin___memcpy_chk): Likewise. (__builtin___memmove_chk: Likewise. (__builtin___mempcpy_chk): Likewise. (__builtin___memset_chk): Likewise. (__builtin___stpcpy_chk): Likewise. (__builtin___strcat_chk): Likewise. (__builtin___strcpy_chk): Likewise. (__builtin___strncat_chk): Likewise. (__builtin___strncpy_chk): Likewise. (__builtin_object_size): Likewise.
2005-03-20* posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_tUlrich Drepper
instead of __off_t for last argument. * debug/Makefile (tests): Add tst-lfschk{1,2,3}. * debug/tst-lfschk1.c: New test. * debug/tst-lfschk2.c: New test. * debug/tst-lfschk3.c: New test. 2005-02-09 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/bits/termios.h (CMSPAR): Define. * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Add __USE_MISC and __USE_XOPEN guards to match linux/bits/termios.h. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. (CMSPAR): Define. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
2005-03-19[BZ #779]Ulrich Drepper
2005-03-10 Jakub Jelinek <jakub@redhat.com> * math/test-misc.c (main): Add some more tests. 2005-03-17 Jakub Jelinek <jakub@redhat.com> * posix/regcomp.c (re_compile_fastmap_iter): Fix check for failed __wcrtomb. Check return values of other __wcrtomb calls. * posix/regex_internal.c (build_wcs_buffer, re_string_skip_chars): Change mbclen type to size_t. (build_wcs_upper_buffer): Change mbclen and mbcdlen type to size_t. Handle mb chars whose upper case doesn't have multibyte representation in locale's charset. 2005-03-15 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.c (_int_icalloc, _int_icomalloc, iALLOc, public_iCALLOc, public_iCALLOc, public_iCOMALLOc): Protect with #ifndef _LIBC. [BZ #779] * malloc/malloc.c (public_mTRIm): Initialize malloc if not yet initialized. 2005-03-10 Jakub Jelinek <jakub@redhat.com> * misc/sys/cdefs.h (__always_inline): Define. * posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd): Use __always_inline instead of __inline. * socket/bits/socket2.h (recv, recvfrom): Likewise. * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Likewise. * string/bits/string3.h (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __memset_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk, __strcat_ichk, __strncat_ichk): Use __always_inline instead of __inline__ __attribute__ ((__always_inline__)). 2005-03-09 Jakub Jelinek <jakub@redhat.com> * debug/tst-chk1.c: Include sys/socket.h and sys/un.h. (do_test): Add new tests for recv, recvfrom, getcwd, getwd and readlink. Add some more tests for read, pread, pread64, fgets and fgets_unlocked. * posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd): Change macros into extern inline functions. (__read_alias, __pread_alias, __pread64_alias, __readlink_alias, __getcwd_alias, __getwd_alias): New prototypes. * socket/bits/socket2.h (recv, recvfrom): Change macros into extern inline functions. (__recv_alias, __recvfrom_alias): New prototypes. * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Change macros into extern inline functions. (__gets_alias, __fgets_alias, __fgets_unlocked_alias): New prototypes. * debug/pread_chk.c (__pread_chk): Fix order of arguments passed to __pread. * debug/pread64_chk.c (__pread64_chk): Fix order of arguments passed to __pread64.
2005-03-06* debug/recv_chk.c (__recv_chk): Always fail if request couldUlrich Drepper
overflow the buffer. * debug/recvfrom_chk.c (__recvfrom_chk): Likewise.
2005-03-01* csu/Makefile: Use printf instead of echo for some shells.Ulrich Drepper
2005-03-01* debug/read_chk.c (__read_chk): Always fail if the buffer is tooUlrich Drepper
small. * debug/readlink_chk.c (__readlink_chk): Likewise. * debug/pread64_chk.c (__pread64_chk): Likewise. * debug/pread_chk.c (__pread_chk): Likewise.
2005-03-012005-02-28 Roland McGrath <roland@redhat.com>Roland McGrath
* debug/warning-nop.c (__nop): Rename to nop, make it static. (__warndecl): Use alias attribute directly, instead of strong_alias macro. Add attribute_hidden.
2005-03-01(__getcwd_chk): Always fail if the buffer is too small.Ulrich Drepper
2005-03-01* posix/bits/unistd.h: Avoid calling __*_chk variants if we canUlrich Drepper
determine the call will never trigger a failure. * sysdeps/i386/i686/memset_chk.S: Remove alias and warning. * sysdeps/x86_64/memset_chk.S: Likewise. 2005-02-24 Roland McGrath <roland@redhat.com> * debug/Versions (libc: GLIBC_2.4): Remove __memset_zero_constant_len_parameter. * sysdeps/generic/memset_chk.c: Remove alias and warning. * misc/sys/cdefs.h (__warndecl): New macro. * debug/warning-nop.c: New file. * string/bits/string3.h (memset): Call __warn_memset_zero_len with no arguments, instead of calling __memset_zero_constant_len_parameter. Use __warndecl for __warn_memset_zero_len. * debug/Makefile (routines): Add $(static-only-routines). (static-only-routines): New variable.
2005-02-21* sysdeps/unix/sysv/linux/libc_fatal.c: Print backtrace and memoryUlrich Drepper
map if requested. * debug/chk_fail.c: Request backtrace and memory map dump. * Versions.def: Add GLIBC_2.4 for libc. * debug/fgets_chk.c: New file. * debug/fgets_u_chk.c: New file. * debug/getcwd_chk.c: New file. * debug/getwd_chk.c: New file. * debug/readlink_chk.c: New file. * debug/read_chk.c: New file. * debug/pread_chk.c: New file. * debug/pread64_chk.c: New file. * debug/recv_chk.c: New file. * debug/recvfrom_chk.c: New file. * debug/Versions: Add all new functions with version GLIBC_2.4. * debug/Makefile (routines): Add fgets_chk, fgets_u_chk, read_chk, pread_chk, pread64_chk, recv_chk, recvfrom_chk, readlink_chk, getwd_chk, and getcwd_chk. Plus appropriate CFLAGS definitions. * debug/tst-chk1.c: Add more tests. * libio/bits/stdio2.h: Add macros for fgets and fgets_unlocked. * include/stdio.h: Declare __fgets_chk and __fgets_unlocked_chk. * posix/unistd.h: Include <bits/unistd.h> for fortification. * posix/bits/unistd.h: New file. * posix/Makefile (headers): Add bits/unistd.h. * socket/sys/socket.h: Include <bits/socket2.h> for fortification. * socket/bits/socket2.h: New file. * socket/Makefile (headers): Add bits/socket2.h. * string/bits/string3.h: Extend memset macro to check for zero 3rd parameter and use __memset_zero_constant_len_parameter in that case. * sysdeps/generic/memset_chk.c: Add __memset_zero_constant_len_parameter alias and linker warning. * debug/Versions: Add __memset_zero_constant_len_parameter to libc with version GLIBC_2.4. * sysdeps/generic/bits/types.h: Don't unnecessarily use __extension__ in __STD_TYPE definition. 2005-02-21 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.c (malloc_printerr): If MALLOC_CHECK_={5,7}, print the error message rather than program name. 2005-02-21 Ulrich Drepper <drepper@redhat.com>
2005-02-12* debug/chk_fail.c (__chk_fail): Add a while (1) loop aroundUlrich Drepper
__libc_message to kill GCC warning about noreturn function returning. * elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag before relocating ld.so again. * elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even for already prelinked ld.so.
2005-01-26Update.Ulrich Drepper
* debug/chk_fail.c (__chk_fail): Print program name in final message.
2005-01-12* posix/getconf.c: Update copyright year.Ulrich Drepper
* nss/getent.c: Likewise. * nscd/nscd_nischeck.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c: Likewise. * elf/ldconfig.c: Likewise. * catgets/gencat.c: Likewise. * csu/version.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/sprof.c (print_version): Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * nscd/nscd.c (print_version): Likewise. * debug/xtrace.sh: Likewise. * malloc/memusage.sh: Likewise. * malloc/mtrace.pl: Likewise. * debug/catchsegv.sh: Likewise.
2004-12-22(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper
2007-07-122.5-18.1Jakub Jelinek
2004-11-18Update.Ulrich Drepper
2004-11-18 Ulrich Drepper <drepper@redhat.com> * libio/libio.h (_IO_FLAGS2_FORTIFY): Renamed from _IO_FLAGS2_CHECK_PERCENT_N. * debug/fprintff_chk.c: Adjust all users. * debug/printf_chk.c: Likewise. * debug/vfprintf_chk.c: Likewise. * debug/vprintf_chk.c: Likewise. * debug/vsnprintf_chk.c: Likewise. * debug/vsprintf_chk.c: Likewise. * stdio-common/vfprintf.c: Likewise. Detect missing %N$ formats. * debug/tst-chk1.c: Test detection of missing %N$ formats.
2004-11-13Update.Ulrich Drepper
2004-11-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/libc_fatal.c: Add new function __libc_message which performs the printing and simple format string handling. The string is written to tty, stderr, syslog in this order, stopping after the first successful output. (__libc_fatal): Call __libc_message. * include/stdio.h: Declare __libc_message. * malloc/malloc.c (malloc_printerr): Use __libc_message. * debug/chk_fail.c: Also print message with __libc_message. * debug/test-strcpy_chk.c: Ensure that debug messages are not printed to the terminal or stderr. * debug/tst-chk1.c: Likewise. * posix/Makefile: Remove gpl2lgpl variable.
2004-11-09Pretty printing.Ulrich Drepper
2004-11-03* debug/tst-chk1.c (ret): New volatile variable.Roland McGrath
(CHK_FAIL_END): Remove redundant ret setting. (do_test): Remote ret variable.
2004-10-22Update.Ulrich Drepper
* debug/execinfo.h: Remove __THROW from backtrace prototype. 2004-10-22 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/Makefile (CFLAGS-backtrace.c): Add -fexceptions. * sysdeps/i386/backtrace.c: Include <bits/libc-lock.h>, <dlfcn.h>, <stdlib.h> and <unwind.h>. Remove <bp-checks.h> include. (struct trace_arg): New type. (unwind_backtrace, unwind_getip, unwind_getcfa, unwind_getgr): New fn pointers resp. macros. (init, backtrace_helper): New functions. (__backtrace): Rewritten to use _Unwind_Backtrace first and fall back to frame pointer walking. 2004-10-22 Ulrich Drepper <drepper@redhat.com>
2004-10-19Update.Ulrich Drepper
2004-10-19 Jakub Jelinek <jakub@redhat.com> * debug/Makefile (catchsegv): Prefix $LIB with a backslash.
2004-10-19Update.Ulrich Drepper
2004-10-19 Ulrich Drepper <drepper@redhat.com> * debug/Makefile ($(objpfx)catchsegv): To support multilib platforms, use $LIB in path to slibdir. 2004-10-19 Jakub Jelinek <jakub@redhat.com> * debug/catchsegv.sh: Update copyright year. Use mktemp to create segv_output file.
2004-10-19Update copyright year. Use mktemp to create segv_output file.Ulrich Drepper
2004-10-182004-10-15 Jakub Jelinek <jakub@redhat.com>Ulrich Drepper
* elf/dl-minimal.c (__chk_fail): New. Add rtld_hidden_def. * sysdeps/unix/sysv/linux/readonly-area.c: New file. * sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking routine. * sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise. * sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise. * sysdeps/i386/i686/memset.S (__memset_chk): Likewise. * sysdeps/i386/i686/memmove-chk.S: New file. * sysdeps/i386/i686/memcpy-chk.S: Likewise. * sysdeps/i386/i686/mempcpy-chk.S: Likewise. * sysdeps/i386/i686/memset-chk.S: Likewise. * sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail if exactly fitting into buffer. * sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise. * sysdeps/generic/readonly-area.c: New file. * sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test destlen once. * sysdeps/x86_64/memset.S (__memset_chk): Add checking routine. * sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise. * sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk. * sysdeps/x86_64/memcpy-chk.S: New file. * sysdeps/x86_64/mempcpy-chk.S: Likewise. * sysdeps/x86_64/memset-chk.S: Likewise. * sysdeps/x86_64/strcpy-chk.S: Likewise. * sysdeps/x86_64/stpcpy-chk.S: Likewise. * argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing. * argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise. * debug/tst-chk1.c: New test. * debug/tst-chk2.c: Likewise. * debug/tst-chk3.c: Likewise. * debug/test-strcpy_chk.c: Likewise. * debug/test-stpcpy_chk.c: Likewise. * debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. * debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk, vfprintf_chk, gets_chk and readonly-area. (CFLAGS-*_chk.c): Set. (tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and test-stpcpy_chk. * debug/vprintf_chk.c: New file. * debug/printf_chk.c: Likewise. * debug/vfprintf_chk.c: Likewise. * debug/fprintf_chk.c: Likewise. * debug/gets_chk.c: Likewise. * debug/chk_fail.c (__chk_fail): Add libc_hidden_def. * debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments passed to __vsnprintf_chk. * debug/Versions (libc): Export __printf_chk, __fprintf_chk, __vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4. * debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call __vsnprintf, instead create a temporary file with _IO_strn_jumps jumptable. If flags > 0, request _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. * libio/Makefile (headers): Add bits/stdio2.h. * libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL. (sprintf, snprintf, vsprintf, vsnprintf): Remove defines. * libio/strfile.h (_IO_strnfile): New type. (_IO_strn_jumps): New extern. * libio/vsnprintf.c (_IO_strnfile): Remove. (_IO_strn_jumps): Remove static. * libio/bits/stdio2.h: New file. * libio/vswprintf.c (_IO_strnfile): Rename type to... (_IO_wstrnfile): ...this. Adjust all uses. * libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define. * stdio-common/vfprintf.c (STR_LEN): Define. (vfprintf): Add readonly_format variable. Handle _IO_FLAGS2_CHECK_PERCENT_N. (buffered_vfprintf): Copy _flags2. * include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk, __vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk, __vfprintf_chk): New prototypes. (__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto. * include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk, __memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk, __strncat_chk): New prototypes. * include/bits/string3.h: New file. * include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto and rtld_hidden_proto. * string/Makefile (headers): Add bits/string3.h. * string/bits/string3.h (bcopy, bzero): New defines. (memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change macros so that inlines are used only if unknown destination size or side-effects in destination argument. (mempcpy, stpcpy): Likewise. Protect with #ifdef __USE_GNU. 2004-09-16 Ulrich Drepper <drepper@redhat.com> * debug/Makefile (routines): Add *_chk. * debug/Versions (libc): Export __chk_fail, __memcpy_chk, __memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk, __strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk, __sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk @GLIBC_2.3.4. * debug/chk_fail.c: New file. * debug/snprintf_chk.c: Likewise. * debug/sprintf_chk.c: Likewise. * debug/vsnprintf_chk.c: Likewise. * debug/vsprintf_chk.c: Likewise. * include/features.h (_FORTIFY_SOURCE): Document, handle. (__USE_FORTIFY_LEVEL): Define. (__GNUC_PREREQ): Move to earlier location. * include/sys/cdefs.h (__chk_fail): New prototype. * libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf): Define if __USE_FORTIFY_LEVEL. * misc/sys/cdefs.h (__bos, __bos0): Define. * string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL. * bits/string/string3.h: New header. * sysdeps/generic/memcpy_chk.c: New file. * sysdeps/generic/memmove_chk.c: Likewise. * sysdeps/generic/mempcpy_chk.c: Likewise. * sysdeps/generic/memset_chk.c: Likewise. * sysdeps/generic/stpcpy_chk.c: Likewise. * sysdeps/generic/strcat_chk.c: Likewise. * sysdeps/generic/strcpy_chk.c: Likewise. * sysdeps/generic/strncat_chk.c: Likewise. * sysdeps/generic/strncpy_chk.c: Likewise. 2004-10-15 Jakub Jelinek <jakub@redhat.com> * elf/dl-minimal.c (__chk_fail): New. Add rtld_hidden_def. * sysdeps/unix/sysv/linux/readonly-area.c: New file. * sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking routine. * sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise. * sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise. * sysdeps/i386/i686/memset.S (__memset_chk): Likewise. * sysdeps/i386/i686/memmove-chk.S: New file. * sysdeps/i386/i686/memcpy-chk.S: Likewise. * sysdeps/i386/i686/mempcpy-chk.S: Likewise. * sysdeps/i386/i686/memset-chk.S: Likewise. * sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail if exactly fitting into buffer. * sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise. * sysdeps/generic/readonly-area.c: New file. * sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test destlen once. * sysdeps/x86_64/memset.S (__memset_chk): Add checking routine. * sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise. * sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk. * sysdeps/x86_64/memcpy-chk.S: New file. * sysdeps/x86_64/mempcpy-chk.S: Likewise. * sysdeps/x86_64/memset-chk.S: Likewise. * sysdeps/x86_64/strcpy-chk.S: Likewise. * sysdeps/x86_64/stpcpy-chk.S: Likewise. * argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing. * argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise. * debug/tst-chk1.c: New test. * debug/tst-chk2.c: Likewise. * debug/tst-chk3.c: Likewise. * debug/test-strcpy_chk.c: Likewise. * debug/test-stpcpy_chk.c: Likewise. * debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. * debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk, vfprintf_chk, gets_chk and readonly-area. (CFLAGS-*_chk.c): Set. (tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and test-stpcpy_chk. * debug/vprintf_chk.c: New file. * debug/printf_chk.c: Likewise. * debug/vfprintf_chk.c: Likewise. * debug/fprintf_chk.c: Likewise. * debug/gets_chk.c: Likewise. * debug/chk_fail.c (__chk_fail): Add libc_hidden_def. * debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments passed to __vsnprintf_chk. * debug/Versions (libc): Export __printf_chk, __fprintf_chk, __vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4. * debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call __vsnprintf, instead create a temporary file with _IO_strn_jumps jumptable. If flags > 0, request _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. * libio/Makefile (headers): Add bits/stdio2.h. * libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL. (sprintf, snprintf, vsprintf, vsnprintf): Remove defines. * libio/strfile.h (_IO_strnfile): New type. (_IO_strn_jumps): New extern. * libio/vsnprintf.c (_IO_strnfile): Remove. (_IO_strn_jumps): Remove static. * libio/bits/stdio2.h: New file. * libio/vswprintf.c (_IO_strnfile): Rename type to... (_IO_wstrnfile): ...this. Adjust all uses. * libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define. * stdio-common/vfprintf.c (STR_LEN): Define. (vfprintf): Add readonly_format variable. Handle _IO_FLAGS2_CHECK_PERCENT_N. (buffered_vfprintf): Copy _flags2. * include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk, __vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk, __vfprintf_chk): New prototypes. (__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto. * include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk, __memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk, __strncat_chk): New prototypes. * include/bits/string3.h: New file. * include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto and rtld_hidden_proto. * string/Makefile (headers): Add bits/string3.h. * string/bits/string3.h (bcopy, bzero): New defines. (memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change macros so that inlines are used only if unknown destination size or side-effects in destination argument. (mempcpy, stpcpy): Likewise. Protect with #ifdef __USE_GNU. 2004-09-16 Ulrich Drepper <drepper@redhat.com> * debug/Makefile (routines): Add *_chk. * debug/Versions (libc): Export __chk_fail, __memcpy_chk, __memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk, __strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk, __sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk @GLIBC_2.3.4. * debug/chk_fail.c: New file. * debug/snprintf_chk.c: Likewise. * debug/sprintf_chk.c: Likewise. * debug/vsnprintf_chk.c: Likewise. * debug/vsprintf_chk.c: Likewise. * include/features.h (_FORTIFY_SOURCE): Document, handle. (__USE_FORTIFY_LEVEL): Define. (__GNUC_PREREQ): Move to earlier location. * include/sys/cdefs.h (__chk_fail): New prototype. * libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf): Define if __USE_FORTIFY_LEVEL. * misc/sys/cdefs.h (__bos, __bos0): Define. * string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL. * bits/string/string3.h: New header. * sysdeps/generic/memcpy_chk.c: New file. * sysdeps/generic/memmove_chk.c: Likewise. * sysdeps/generic/mempcpy_chk.c: Likewise. * sysdeps/generic/memset_chk.c: Likewise. * sysdeps/generic/stpcpy_chk.c: Likewise. * sysdeps/generic/strcat_chk.c: Likewise. * sysdeps/generic/strcpy_chk.c: Likewise. * sysdeps/generic/strncat_chk.c: Likewise. * sysdeps/generic/strncpy_chk.c: Likewise.
2004-09-17[BZ #390]Ulrich Drepper
Update. 2004-09-18 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/nscd_setup_thread.c (setup_thread): Do nothing if __NR_set_tid_address is not defined. [BZ #390] 2004-09-17 Ulrich Drepper <drepper@redhat.com> * sysdeps/posix/getaddrinfo.c: Use gethostbyname3_r NSS function in case it is available.
2004-09-17Update.Ulrich Drepper
* catgets/nl_types.h: Likewise. * crypt/crypt.h: Likewise. * debug/execinfo.h: Likewise.
2004-06-15[BZ #217, BZ #219]Roland McGrath
2004-06-14 Jakub Jelinek <jakub@redhat.com> [BZ #219] * nss/nsswitch.c (free_mem): Don't try to close a library handle if the handle is invalid. Patch by David Kimdon <kimdon@esrf.fr>. 2004-06-11 Dmitry V. Levin <ldv@altlinux.org> [BZ #217] * debug/xtrace.sh: Fix typo in error diagnostics.
2004-05-17[BZ #40]Ulrich Drepper
Update. 2004-05-15 Petter Reinholdtsen <pere@hungry.com> * locale/iso-3166.def: Remove YUGOSLAVIA and insert "SERBIA AND MONTENEGRO" which have taken over the code 819. Patch from Danilo Segan. [BZ #40] 2004-05-15 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (SYSCALL_ERROR_HANDLER): Rename __sparc.get_pic.l7 to __sparc_get_pic_l7. 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk> * catgets/gencat.c: Update bug reporting instructions. * csu/version.c: Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c: Likewise. * debug/xtrace.sh: Likewise. * elf/ldd.bash.in: Likewise. * iconv/iconv_prog.c: Likewise. * iconv/iconvconfig.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * login/programs/pt_chown.c: Likewise. * malloc/memusage.sh: Likewise. * malloc/memusagestat.c: Likewise. * malloc/mtrace.pl: Likewise. * manual/crypt.texi: Likewise. * manual/install.texi: Likewise. * nss/makedb.c: Likewise. 2004-05-14 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Only CHECK_STATIC_TLS if sym != NULL. * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_rela): Likewise. 2004-05-12 Andreas Schwab <schwab@suse.de> * posix/regex_internal.c (build_wcs_buffer): Also set pstr->mbs when translating. 2004-05-13 H.J. Lu <hongjiu.lu@intel.com> * Rules (xtests): Depend on tests.
2004-01-01Update copyright year.Ulrich Drepper
2003-02-06Update.Ulrich Drepper
* debug/catchsegv.sh: Fix typo in error messsage. Reported by John Levon <leven@movementarian.org>.
2003-01-02Update.Ulrich Drepper
2003-01-02 Art Haas <ahaas@airmail.net> * login/tst-utmp.c: Convert GCC extension initializer syntax to C99. 2003-01-02 Ulrich Drepper <drepper@redhat.com> * posix/getconf.c: Update copyright year. * nss/getent.c: Likewise. * nscd/nscd_nischeck.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c: Likewise. * elf/ldconfig.c: Likewise. * catgets/gencat.c: Likewise. * csu/version.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/sprof.c (print_version): Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * nscd/nscd.c (print_version): Likewise. * debug/xtrace.sh: Likewise. * malloc/memusage.sh: Likewise. * malloc/mtrace.pl: Likewise. * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Use union type to avoid strict aliasing problem. (_nss_dns_gethostbyname2_r): Likewise. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise. (_nss_dns_getnetbyname_r): Likewise.
2002-05-15Update.Ulrich Drepper
2002-05-06 Jungshik Shin <jshin@mailaps.org> * charmaps/UTF-8: Fix wcwidth for Hangul Conjoining medial vowels and trailing consonant. * charmaps/GB18030: Likewise
2002-04-15Update.Ulrich Drepper
2002-04-14 Jakub Jelinek <jakub@redhat.com> * elf/dl-lookup.c (_dl_lookup_symbol): Move add_dependency call to the end of the function. Pass original flags to recursive call if add_dependency failed. (_dl_lookup_versioned_symbol): Likewise. 2002-04-13 Jakub Jelinek <jakub@redhat.com> * time/mktime.c (__mktime_internal): If year is 69, don't bail out early, but check whether it overflowed afterwards. * time/tst-mktime.c (main): Add new tests. * debug/xtrace.sh: Fix program name in help message. Patch by Roger Luethi <rl@hellgate.ch>.