aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /debug
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'debug')
-rw-r--r--debug/Depend1
-rw-r--r--debug/Makefile51
-rw-r--r--debug/Versions21
-rw-r--r--debug/backtrace.c94
-rw-r--r--debug/backtracesyms.c58
-rw-r--r--debug/backtracesymsfd.c64
-rwxr-xr-xdebug/catchsegv.sh4
-rw-r--r--debug/chk_fail.c10
-rw-r--r--debug/confstr_chk.c30
-rw-r--r--debug/execinfo.h5
-rw-r--r--debug/fgets_chk.c67
-rw-r--r--debug/fgets_u_chk.c65
-rw-r--r--debug/fgetws_chk.c54
-rw-r--r--debug/fgetws_u_chk.c61
-rw-r--r--debug/fprintf_chk.c5
-rw-r--r--debug/fwprintf_chk.c45
-rw-r--r--debug/getcwd_chk.c31
-rw-r--r--debug/getdomainname_chk.c29
-rw-r--r--debug/getgroups_chk.c30
-rw-r--r--debug/gethostname_chk.c29
-rw-r--r--debug/getlogin_r_chk.c29
-rw-r--r--debug/getwd_chk.c34
-rw-r--r--debug/mbsnrtowcs_chk.c31
-rw-r--r--debug/mbsrtowcs_chk.c31
-rw-r--r--debug/mbstowcs_chk.c35
-rw-r--r--debug/memcpy_chk.c66
-rw-r--r--debug/memmove_chk.c98
-rw-r--r--debug/mempcpy_chk.c67
-rw-r--r--debug/memset_chk.c92
-rw-r--r--debug/pread64_chk.c30
-rw-r--r--debug/pread_chk.c30
-rw-r--r--debug/printf_chk.c5
-rw-r--r--debug/ptsname_r_chk.c29
-rw-r--r--debug/read_chk.c38
-rw-r--r--debug/readlink_chk.c38
-rw-r--r--debug/readlinkat_chk.c31
-rw-r--r--debug/readonly-area.c34
-rw-r--r--debug/realpath_chk.c60
-rw-r--r--debug/recv_chk.c30
-rw-r--r--debug/recvfrom_chk.c31
-rw-r--r--debug/segfault.c214
-rw-r--r--debug/snprintf_chk.c9
-rw-r--r--debug/sprintf_chk.c7
-rw-r--r--debug/stack_chk_fail.c33
-rw-r--r--debug/stack_chk_fail_local.c30
-rw-r--r--debug/stpcpy_chk.c45
-rw-r--r--debug/stpncpy_chk.c85
-rw-r--r--debug/strcat_chk.c58
-rw-r--r--debug/strcpy_chk.c68
-rw-r--r--debug/strncat_chk.c100
-rw-r--r--debug/strncpy_chk.c89
-rw-r--r--debug/swprintf_chk.c37
-rw-r--r--debug/tst-chk1.c847
-rw-r--r--debug/tst-lfschk1.c2
-rw-r--r--debug/tst-lfschk2.c2
-rw-r--r--debug/tst-lfschk3.c2
-rw-r--r--debug/ttyname_r_chk.c29
-rw-r--r--debug/vfprintf_chk.c6
-rw-r--r--debug/vfwprintf_chk.c43
-rw-r--r--debug/vprintf_chk.c5
-rw-r--r--debug/vsnprintf_chk.c10
-rw-r--r--debug/vsprintf_chk.c10
-rw-r--r--debug/vswprintf_chk.c75
-rw-r--r--debug/vwprintf_chk.c43
-rw-r--r--debug/warning-nop.c53
-rw-r--r--debug/wcpcpy_chk.c45
-rw-r--r--debug/wcpncpy_chk.c33
-rw-r--r--debug/wcrtomb_chk.c35
-rw-r--r--debug/wcscat_chk.c55
-rw-r--r--debug/wcscpy_chk.c61
-rw-r--r--debug/wcsncat_chk.c96
-rw-r--r--debug/wcsncpy_chk.c33
-rw-r--r--debug/wcsnrtombs_chk.c31
-rw-r--r--debug/wcsrtombs_chk.c31
-rw-r--r--debug/wcstombs_chk.c36
-rw-r--r--debug/wctomb_chk.c36
-rw-r--r--debug/wmemcpy_chk.c30
-rw-r--r--debug/wmemmove_chk.c30
-rw-r--r--debug/wmempcpy_chk.c31
-rw-r--r--debug/wmemset_chk.c30
-rw-r--r--debug/wprintf_chk.c46
-rwxr-xr-xdebug/xtrace.sh28
82 files changed, 4122 insertions, 60 deletions
diff --git a/debug/Depend b/debug/Depend
new file mode 100644
index 0000000000..f3e1156a4e
--- /dev/null
+++ b/debug/Depend
@@ -0,0 +1 @@
+localedata
diff --git a/debug/Makefile b/debug/Makefile
index 6df06116b7..9d9b6ac96a 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001,2004,2005,2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -24,12 +24,27 @@ subdir := debug
headers := execinfo.h
distribute = sigcontextinfo.h register-dump.h frame.h
-routines := backtrace backtracesyms backtracesymsfd noophooks \
+routines = backtrace backtracesyms backtracesymsfd noophooks \
memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
- strcat_chk strcpy_chk strncat_chk strncpy_chk \
+ strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \
printf_chk fprintf_chk vprintf_chk vfprintf_chk \
- gets_chk chk_fail readonly-area
+ gets_chk chk_fail readonly-area fgets_chk fgets_u_chk \
+ read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
+ readlink_chk readlinkat_chk getwd_chk getcwd_chk \
+ realpath_chk ptsname_r_chk \
+ wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
+ wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
+ wcpncpy_chk \
+ swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
+ vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
+ confstr_chk getgroups_chk ttyname_r_chk getlogin_r_chk \
+ gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
+ wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
+ wcstombs_chk \
+ stack_chk_fail \
+ $(static-only-routines)
+static-only-routines := warning-nop stack_chk_fail_local
CFLAGS-backtrace.c = -fno-omit-frame-pointer
CFLAGS-sprintf_chk.c = -D_IO_MTSAFE_IO
@@ -41,9 +56,31 @@ CFLAGS-fprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-vprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-vfprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
CFLAGS-gets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-fgets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-fgets_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-swprintf_chk.c = -D_IO_MTSAFE_IO
+CFLAGS-vswprintf_chk.c = -D_IO_MTSAFE_IO
+CFLAGS-wprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-fwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-vwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-vfwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-fgetws_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-fgetws_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-read_chk.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pread_chk.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pread64_chk.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-recv_chk.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-recvfrom_chk.c = -fexceptions -fasynchronous-unwind-tables
+
+tst-chk1-ENV = LOCPATH=$(common-objpfx)localedata
+tst-chk2-ENV = LOCPATH=$(common-objpfx)localedata
+tst-chk3-ENV = LOCPATH=$(common-objpfx)localedata
+tst-lfschk1-ENV = LOCPATH=$(common-objpfx)localedata
+tst-lfschk2-ENV = LOCPATH=$(common-objpfx)localedata
+tst-lfschk3-ENV = LOCPATH=$(common-objpfx)localedata
tests = backtrace-tst tst-chk1 tst-chk2 tst-chk3 \
- test-strcpy_chk test-stpcpy_chk
+ tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk
extra-libs = libSegFault libpcprofile
extra-libs-others = $(extra-libs)
@@ -70,6 +107,8 @@ generated = catchsegv xtrace
include ../Rules
+sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
+
$(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \
$(common-objpfx)config.make
slibpfx=`echo $(slibdir)|sed 's/lib\(64\|\)$$/\\\\\\\\$$LIB/'`; \
@@ -82,7 +121,7 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
$(objpfx)xtrace: xtrace.sh
rm -f $@.new
sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
- -e 's|@SLIBDIR@|$(slibdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
+ -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
&& rm -f $@ && mv $@.new $@ && chmod +x $@
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.