[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r20848 - in /fsf/trunk/libc: ./ catgets/ elf/ grp/ iconvdata/ intl/ io/ libio/ localedata/ malloc/ nptl/ posix/ stdio-common...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r20848 - in /fsf/trunk/libc: ./ catgets/ elf/ grp/ iconvdata/ intl/ io/ libio/ localedata/ malloc/ nptl/ posix/ stdio-common...
- From: eglibc@xxxxxxxxxx
- Date: Tue, 25 Sep 2012 14:11:38 -0000
Author: eglibc
Date: Tue Sep 25 14:11:37 2012
New Revision: 20848
Log:
Import glibc-mainline for 2012-09-25
Added:
fsf/trunk/libc/sysdeps/generic/malloc-sysdep.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/malloc-sysdep.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/Makeconfig
fsf/trunk/libc/NEWS
fsf/trunk/libc/catgets/Makefile
fsf/trunk/libc/catgets/test-gencat.sh
fsf/trunk/libc/elf/Makefile
fsf/trunk/libc/elf/tst-pathopt.sh
fsf/trunk/libc/grp/Makefile
fsf/trunk/libc/grp/tst_fgetgrent.sh
fsf/trunk/libc/iconvdata/Makefile
fsf/trunk/libc/iconvdata/run-iconv-test.sh
fsf/trunk/libc/intl/Makefile
fsf/trunk/libc/intl/tst-gettext.sh
fsf/trunk/libc/intl/tst-gettext2.sh
fsf/trunk/libc/intl/tst-gettext4.sh
fsf/trunk/libc/intl/tst-gettext6.sh
fsf/trunk/libc/intl/tst-translit.sh
fsf/trunk/libc/io/Makefile
fsf/trunk/libc/io/ftwtest-sh
fsf/trunk/libc/libio/Makefile
fsf/trunk/libc/libio/fileops.c
fsf/trunk/libc/libio/libio.h
fsf/trunk/libc/libio/libioP.h
fsf/trunk/libc/libio/test-freopen.sh
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/Makefile
fsf/trunk/libc/localedata/gen-locale.sh
fsf/trunk/libc/localedata/sort-test.sh
fsf/trunk/libc/localedata/tst-ctype.sh
fsf/trunk/libc/localedata/tst-fmon.sh
fsf/trunk/libc/localedata/tst-langinfo.sh
fsf/trunk/libc/localedata/tst-locale.sh
fsf/trunk/libc/localedata/tst-mbswcs.sh
fsf/trunk/libc/localedata/tst-numeric.sh
fsf/trunk/libc/localedata/tst-rpmatch.sh
fsf/trunk/libc/localedata/tst-trans.sh
fsf/trunk/libc/localedata/tst-wctype.sh
fsf/trunk/libc/malloc/Makefile
fsf/trunk/libc/malloc/arena.c
fsf/trunk/libc/malloc/tst-mtrace.sh
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/Makefile
fsf/trunk/libc/nptl/tst-tls6.sh
fsf/trunk/libc/posix/Makefile
fsf/trunk/libc/posix/globtest.sh
fsf/trunk/libc/posix/tst-getconf.sh
fsf/trunk/libc/posix/wordexp-tst.sh
fsf/trunk/libc/stdio-common/Makefile
fsf/trunk/libc/stdio-common/tst-printf.sh
fsf/trunk/libc/stdio-common/tst-unbputc.sh
fsf/trunk/libc/stdlib/Makefile
fsf/trunk/libc/stdlib/tst-fmtmsg.sh
fsf/trunk/libc/sysdeps/generic/_G_config.h
fsf/trunk/libc/sysdeps/gnu/_G_config.h
fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h
fsf/trunk/libc/sysdeps/x86_64/Makefile
fsf/trunk/libc/sysdeps/x86_64/tst-xmmymm.sh
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Sep 25 14:11:37 2012
@@ -1,4 +1,99 @@
+2012-09-25 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * libio/libio.h (_IO_size_t): Define to size_t, not _G_size_t.
+ (_IO_ssize_t): Define to __ssize_t, not _G_ssize_t.
+ (_IO_off_t): Define to __off_t, not _G_off_t.
+ (_IO_pid_t): Define to __pid_t, not _G_pid_t.
+ (_IO_uid_t): Define to __uid_t, not _G_uid_t.
+ (_IO_wint_t): Define to wint_t, not _G_wint_t.
+ * libio/libioP.h (struct _IO_jump_t): Use size_t not _G_size_t as
+ type of __dummy and __dummy2 fields.
+ * sysdeps/generic/_G_config.h (_G_size_t): Remove.
+ (_G_ssize_t): Likewise.
+ (_G_off_t): Likewise.
+ (_G_pid_t): Likewise.
+ (_G_uid_t): Likewise.
+ (_G_wchar_t): Likewise.
+ (_G_wint_t): Likewise.
+ * sysdeps/gnu/_G_config.h (_G_size_t): Remove.
+ (_G_ssize_t): Likewise.
+ (_G_off_t): Likewise.
+ (_G_pid_t): Likewise.
+ (_G_uid_t): Likewise.
+ (_G_wchar_t): Likewise.
+ (_G_wint_t): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_size_t): Remove.
+ (_G_ssize_t): Likewise.
+ (_G_off_t): Likewise.
+ (_G_pid_t): Likewise.
+ (_G_uid_t): Likewise.
+ (_G_wchar_t): Likewise.
+ (_G_wint_t): Likewise.
+
+2012-09-25 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ * malloc/arena.c: Include malloc-sysdep.h.
+ (shrink_heap): Use check_may_shrink_heap to decide if madvise
+ is sufficient to shrink the heap or an unmap is needed.
+ * sysdeps/generic/malloc-sysdep.h: New file. Define
+ new function check_may_shrink_heap.
+ * sysdeps/unix/sysv/linux/malloc-sysdep.h: New file. Define
+ new function check_may_shrink_heap.
+
+2012-09-25 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ * libio/fileops.c (_IO_new_file_seekoff): Fix typos in
+ comments.
+
+2012-09-24 Dmitry V. Levin <ldv@xxxxxxxxxxxx>
+
+ * catgets/test-gencat.sh: Add "set -e".
+ * elf/tst-pathopt.sh: Likewise.
+ * grp/tst_fgetgrent.sh: Likewise.
+ * iconvdata/run-iconv-test.sh: Likewise.
+ * intl/tst-gettext.sh: Likewise.
+ * intl/tst-gettext2.sh: Likewise.
+ * intl/tst-gettext4.sh: Likewise.
+ * intl/tst-gettext6.sh: Likewise.
+ * intl/tst-translit.sh: Likewise.
+ * io/ftwtest-sh: Likewise.
+ * libio/test-freopen.sh: Likewise.
+ * malloc/tst-mtrace.sh: Likewise.
+ * posix/globtest.sh: Likewise.
+ * posix/tst-getconf.sh: Likewise.
+ * posix/wordexp-tst.sh: Likewise.
+ * stdio-common/tst-printf.sh: Likewise.
+ * stdio-common/tst-unbputc.sh: Likewise.
+ * stdlib/tst-fmtmsg.sh: Likewise.
+ * sysdeps/x86_64/tst-xmmymm.sh: Likewise.
+ * catgets/Makefile: Do not specify -e option when running
+ testsuite shell scripts.
+ * elf/Makefile: Likewise.
+ * grp/Makefile: Likewise.
+ * iconvdata/Makefile: Likewise.
+ * intl/Makefile: Likewise.
+ * io/Makefile: Likewise.
+ * libio/Makefile: Likewise.
+ * malloc/Makefile: Likewise.
+ * posix/Makefile: Likewise.
+ * stdio-common/Makefile: Likewise.
+ * stdlib/Makefile: Likewise.
+ * sysdeps/x86_64/Makefile: Likewise.
+
+ * io/ftwtest-sh: Add copyright header.
+ * posix/globtest.sh: Likewise.
+ * posix/tst-getconf.sh: Likewise.
+ * posix/wordexp-tst.sh: Likewise.
+ * sysdeps/x86_64/tst-xmmymm.sh: Likewise.
+
2012-09-24 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #13679]
+ * Makeconfig (+link): Defined as $(+link-static) if
+ $(build-shared) isn't yes.
+ (link-tests): Defined as $(+link-static-tests) if $(build-shared)
+ isn't yes.
+ (static-gnulib): Add -lgcc_eh if $(build-shared) isn't yes.
* Makeconfig (+postctorT): Replace crtendS.o with crtend.o.
Modified: fsf/trunk/libc/Makeconfig
==============================================================================
--- fsf/trunk/libc/Makeconfig (original)
+++ fsf/trunk/libc/Makeconfig Tue Sep 25 14:11:37 2012
@@ -411,22 +411,6 @@
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
endif
-# Commands for linking programs with the C library.
-ifndef +link
-+link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
- $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
- $(addprefix $(csu-objpfx),$(start-installed-name)) \
- $(+preinit) $(+prector) \
- $(filter-out $(addprefix $(csu-objpfx),start.o \
- $(start-installed-name))\
- $(+preinit) $(link-extra-libs) \
- $(common-objpfx)libc% $(+postinit),$^) \
- $(link-extra-libs)
-+link-after-libc = $(+postctor) $(+postinit)
-+link = $(+link-before-libc) $(link-libc) $(+link-after-libc)
-+link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc)
-endif
# Command for linking PIE programs with the C library.
ifndef +link-pie
+link-pie = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \
@@ -456,6 +440,27 @@
$(+link-static-after-libc)
+link-static-tests = $(+link-static-before-libc) $(link-libc-static-tests) \
$(+link-static-after-libc)
+endif
+# Commands for linking programs with the C library.
+ifndef +link
+ifeq (yes,$(build-shared))
++link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
+ $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
+ $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
+ $(addprefix $(csu-objpfx),$(start-installed-name)) \
+ $(+preinit) $(+prector) \
+ $(filter-out $(addprefix $(csu-objpfx),start.o \
+ $(start-installed-name))\
+ $(+preinit) $(link-extra-libs) \
+ $(common-objpfx)libc% $(+postinit),$^) \
+ $(link-extra-libs)
++link-after-libc = $(+postctor) $(+postinit)
++link = $(+link-before-libc) $(link-libc) $(+link-after-libc)
++link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc)
+else
++link = $(+link-static)
++link-tests = $(+link-static-tests)
+endif
endif
# Command for statically linking bounded-pointer programs with the C library.
ifndef +link-bounded
@@ -568,7 +573,14 @@
gnulib = -lgcc $(gnulib-arch)
gnulib-tests := -lgcc $(libgcc_eh)
static-gnulib-arch =
+# By default, elf/static-stubs.o, instead of -lgcc_eh, is used to
+# statically link programs. When --disable-shared is used, we use
+# -lgcc_eh since elf/static-stubs.o isn't sufficient.
+ifeq (yes,$(build-shared))
static-gnulib = -lgcc $(static-gnulib-arch)
+else
+static-gnulib = -lgcc -lgcc_eh $(static-gnulib-arch)
+endif
static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
libc.so-gnulib := -lgcc
endif
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Tue Sep 25 14:11:37 2012
@@ -10,11 +10,11 @@
* The following bugs are resolved with this release:
1349, 3479, 5044, 5400, 6778, 6808, 9685, 9914, 10014, 10038, 11607,
- 13412, 13542, 13717, 13696, 13939, 13966, 14042, 14090, 14166, 14150,
- 14151, 14154, 14157, 14166, 14173, 14195, 14237, 14252, 14283, 14298,
- 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459, 14476,
- 14505, 14510, 14516, 14518, 14519, 14532, 14538, 14544, 14545, 14562,
- 14576, 14579, 14583, 14587.
+ 13412, 13542, 13679, 13717, 13696, 13939, 13966, 14042, 14090, 14166,
+ 14150, 14151, 14154, 14157, 14166, 14173, 14195, 14237, 14252, 14283,
+ 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459,
+ 14476, 14505, 14510, 14516, 14518, 14519, 14532, 14538, 14544, 14545,
+ 14562, 14576, 14579, 14583, 14587.
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
Modified: fsf/trunk/libc/catgets/Makefile
==============================================================================
--- fsf/trunk/libc/catgets/Makefile (original)
+++ fsf/trunk/libc/catgets/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2000, 2002-2004, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 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
@@ -75,7 +75,7 @@
$(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \
$(objpfx)sample.SJIS.cat
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
Modified: fsf/trunk/libc/catgets/test-gencat.sh
==============================================================================
--- fsf/trunk/libc/catgets/test-gencat.sh (original)
+++ fsf/trunk/libc/catgets/test-gencat.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test escape character handling in gencat.
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Tue Sep 25 14:11:37 2012
@@ -705,7 +705,7 @@
$(objpfx)tst-pathopt: $(libdl)
$(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
$(objpfx)pathoptobj.so
- $(SHELL) -e $< $(common-objpfx)
+ $(SHELL) $< $(common-objpfx)
$(objpfx)tst-rtld-load-self.out: tst-rtld-load-self.sh $(objpfx)ld.so
$(SHELL) $^ > $@
Modified: fsf/trunk/libc/elf/tst-pathopt.sh
==============================================================================
--- fsf/trunk/libc/elf/tst-pathopt.sh (original)
+++ fsf/trunk/libc/elf/tst-pathopt.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test lookup path optimization.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/grp/Makefile
==============================================================================
--- fsf/trunk/libc/grp/Makefile (original)
+++ fsf/trunk/libc/grp/Makefile Tue Sep 25 14:11:37 2012
@@ -55,7 +55,7 @@
ifeq (yes,$(build-shared))
tests: $(objpfx)tst_fgetgrent.out
$(objpfx)tst_fgetgrent.out: tst_fgetgrent.sh $(objpfx)tst_fgetgrent
- $(SHELL) -e tst_fgetgrent.sh $(common-objpfx) $(elf-objpfx) \
+ $(SHELL) $< $(common-objpfx) $(elf-objpfx) \
$(rtld-installed-name)
endif
Modified: fsf/trunk/libc/grp/tst_fgetgrent.sh
==============================================================================
--- fsf/trunk/libc/grp/tst_fgetgrent.sh (original)
+++ fsf/trunk/libc/grp/tst_fgetgrent.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
-# Copyright (C) 1999 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger <aj@xxxxxxxxxxxxxxxxxxxxxx>, 1999.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
elf_objpfx=$1; shift
Modified: fsf/trunk/libc/iconvdata/Makefile
==============================================================================
--- fsf/trunk/libc/iconvdata/Makefile (original)
+++ fsf/trunk/libc/iconvdata/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2008, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 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
@@ -299,7 +299,7 @@
$(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so)) \
$(common-objdir)/iconv/iconv_prog TESTS
- $(SHELL) -e $< $(common-objdir) > $@
+ $(SHELL) $< $(common-objdir) > $@
$(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so)) \
Modified: fsf/trunk/libc/iconvdata/run-iconv-test.sh
==============================================================================
--- fsf/trunk/libc/iconvdata/run-iconv-test.sh (original)
+++ fsf/trunk/libc/iconvdata/run-iconv-test.sh Tue Sep 25 14:11:37 2012
@@ -1,9 +1,8 @@
#! /bin/sh -f
# Run available iconv(1) tests.
-# Copyright (C) 1998-2002, 2005, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
codir=$1
Modified: fsf/trunk/libc/intl/Makefile
==============================================================================
--- fsf/trunk/libc/intl/Makefile (original)
+++ fsf/trunk/libc/intl/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2003,2005,2008,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2012 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
@@ -74,16 +74,16 @@
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \
+ $(SHELL) $< $(common-objpfx) $(common-objpfx)intl/ \
$(objpfx)tst-gettext.mtrace
$(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) $(common-objpfx)intl/
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) $(common-objpfx)intl/
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-codeset.out: $(codeset_mo)
$(objpfx)tst-gettext3.out: $(codeset_mo)
Modified: fsf/trunk/libc/intl/tst-gettext.sh
==============================================================================
--- fsf/trunk/libc/intl/tst-gettext.sh (original)
+++ fsf/trunk/libc/intl/tst-gettext.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of gettext functions.
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
objpfx=$2
Modified: fsf/trunk/libc/intl/tst-gettext2.sh
==============================================================================
--- fsf/trunk/libc/intl/tst-gettext2.sh (original)
+++ fsf/trunk/libc/intl/tst-gettext2.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of gettext functions.
-# Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
objpfx=$2
Modified: fsf/trunk/libc/intl/tst-gettext4.sh
==============================================================================
--- fsf/trunk/libc/intl/tst-gettext4.sh (original)
+++ fsf/trunk/libc/intl/tst-gettext4.sh Tue Sep 25 14:11:37 2012
@@ -1,9 +1,8 @@
#! /bin/sh
# Test that gettext() in multithreaded applications works correctly if
# different threads operate in different locales with the same encoding.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/intl/tst-gettext6.sh
==============================================================================
--- fsf/trunk/libc/intl/tst-gettext6.sh (original)
+++ fsf/trunk/libc/intl/tst-gettext6.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test that gettext() in multithreaded applications works correctly.
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/intl/tst-translit.sh
==============================================================================
--- fsf/trunk/libc/intl/tst-translit.sh (original)
+++ fsf/trunk/libc/intl/tst-translit.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of transliteration in gettext functions.
-# Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
objpfx=$2
Modified: fsf/trunk/libc/io/Makefile
==============================================================================
--- fsf/trunk/libc/io/Makefile (original)
+++ fsf/trunk/libc/io/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2003,2005-2008,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-2012 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
@@ -102,6 +102,6 @@
tests: $(objpfx)ftwtest.out
$(objpfx)ftwtest.out: $(objpfx)ftwtest
- $(SHELL) -e ftwtest-sh $(shell cd $(common-objpfx). && pwd)/ \
+ $(SHELL) ftwtest-sh $(shell cd $(common-objpfx). && pwd)/ \
$(shell cd $(<D) && pwd)/$(<F) > $@
endif
Modified: fsf/trunk/libc/io/ftwtest-sh
==============================================================================
--- fsf/trunk/libc/io/ftwtest-sh (original)
+++ fsf/trunk/libc/io/ftwtest-sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test for nftw(3).
+# Copyright (C) 1997-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
# The common objpfx, used to find libraries and the dynamic loader.
objpfx=$1
Modified: fsf/trunk/libc/libio/Makefile
==============================================================================
--- fsf/trunk/libc/libio/Makefile (original)
+++ fsf/trunk/libc/libio/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2004,2006-2009,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2012 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
@@ -184,7 +184,7 @@
endif
$(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
$(common-objpfx)libio/
$(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out
Modified: fsf/trunk/libc/libio/fileops.c
==============================================================================
--- fsf/trunk/libc/libio/fileops.c (original)
+++ fsf/trunk/libc/libio/fileops.c Tue Sep 25 14:11:37 2012
@@ -984,10 +984,10 @@
/* Flush unwritten characters.
(This may do an unneeded write if we seek within the buffer.
But to be able to switch to reading, we would need to set
- egptr to ptr. That can't be done in the current design,
+ egptr to pptr. That can't be done in the current design,
which assumes file_ptr() is eGptr. Anyway, since we probably
end up flushing when we close(), it doesn't make much difference.)
- FIXME: simulate mem-papped files. */
+ FIXME: simulate mem-mapped files. */
if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp))
if (_IO_switch_to_get_mode (fp))
Modified: fsf/trunk/libc/libio/libio.h
==============================================================================
--- fsf/trunk/libc/libio/libio.h (original)
+++ fsf/trunk/libc/libio/libio.h Tue Sep 25 14:11:37 2012
@@ -34,17 +34,17 @@
#define _IO_pos_t _G_fpos_t /* obsolete */
#define _IO_fpos_t _G_fpos_t
#define _IO_fpos64_t _G_fpos64_t
-#define _IO_size_t _G_size_t
-#define _IO_ssize_t _G_ssize_t
-#define _IO_off_t _G_off_t
+#define _IO_size_t size_t
+#define _IO_ssize_t __ssize_t
+#define _IO_off_t __off_t
#define _IO_off64_t _G_off64_t
-#define _IO_pid_t _G_pid_t
-#define _IO_uid_t _G_uid_t
+#define _IO_pid_t __pid_t
+#define _IO_uid_t __uid_t
#define _IO_iconv_t _G_iconv_t
#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
#define _IO_BUFSIZ _G_BUFSIZ
#define _IO_va_list _G_va_list
-#define _IO_wint_t _G_wint_t
+#define _IO_wint_t wint_t
/* This define avoids name pollution if we're using GNU stdarg.h */
#define __need___va_list
Modified: fsf/trunk/libc/libio/libioP.h
==============================================================================
--- fsf/trunk/libc/libio/libioP.h (original)
+++ fsf/trunk/libc/libio/libioP.h Tue Sep 25 14:11:37 2012
@@ -282,8 +282,8 @@
struct _IO_jump_t
{
- JUMP_FIELD(_G_size_t, __dummy);
- JUMP_FIELD(_G_size_t, __dummy2);
+ JUMP_FIELD(size_t, __dummy);
+ JUMP_FIELD(size_t, __dummy2);
JUMP_FIELD(_IO_finish_t, __finish);
JUMP_FIELD(_IO_overflow_t, __overflow);
JUMP_FIELD(_IO_underflow_t, __underflow);
Modified: fsf/trunk/libc/libio/test-freopen.sh
==============================================================================
--- fsf/trunk/libc/libio/test-freopen.sh (original)
+++ fsf/trunk/libc/libio/test-freopen.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of freopen.
-# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
objpfx=$3
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Tue Sep 25 14:11:37 2012
@@ -1,3 +1,21 @@
+2012-09-24 Dmitry V. Levin <ldv@xxxxxxxxxxxx>
+
+ * gen-locale.sh: Add "set -e".
+ * sort-test.sh: Likewise.
+ * tst-ctype.sh: Likewise.
+ * tst-fmon.sh: Likewise.
+ * tst-langinfo.sh: Likewise.
+ * tst-locale.sh: Likewise.
+ * tst-mbswcs.sh: Likewise.
+ * tst-numeric.sh: Likewise.
+ * tst-rpmatch.sh: Likewise.
+ * tst-trans.sh: Likewise.
+ * tst-wctype.sh: Likewise.
+ * Makefile: Do not specify -e option when running testsuite
+ shell scripts.
+
+ * sort-test.sh: Add copyright header.
+
2012-09-05 Jeff Law <law@xxxxxxxxxx>
[BZ#14510]
Modified: fsf/trunk/libc/localedata/Makefile
==============================================================================
--- fsf/trunk/libc/localedata/Makefile (original)
+++ fsf/trunk/libc/localedata/Makefile Tue Sep 25 14:11:37 2012
@@ -1,5 +1,4 @@
-# Copyright (C) 1996-2003,2005,2007-2009,2011,2012
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 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
@@ -134,7 +133,7 @@
$(addprefix $(objpfx),$(CTYPE_FILES)): %: \
gen-locale.sh $(common-objpfx)locale/localedef Makefile \
$(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
- @$(SHELL) -e gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
+ @$(SHELL) gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
$(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \
$(addprefix $(objpfx),$(CTYPE_FILES))
@@ -146,45 +145,45 @@
$(objpfx)sort-test.out: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
$(test-input-data) $(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(test-input) \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(test-input) \
> $@
$(objpfx)tst-fmon.out: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-fmon.data \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' tst-fmon.data \
> $@
$(objpfx)tst-numeric.out: tst-numeric.sh $(objpfx)tst-numeric tst-numeric.data \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-numeric.data \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' tst-numeric.data \
> $@
$(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
$(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@
$(objpfx)tst-rpmatch.out: tst-rpmatch.sh $(objpfx)tst-rpmatch \
$(objpfx)tst-fmon.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@
$(objpfx)tst-trans.out: tst-trans.sh $(objpfx)tst-trans \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)'
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
$(objpfx)tst-mbswcs.out: tst-mbswcs.sh $(objpfx)tst-mbswcs1 \
$(objpfx)tst-mbswcs2 $(objpfx)tst-mbswcs3 \
$(objpfx)tst-mbswcs4 $(objpfx)tst-mbswcs5 \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)'
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
$(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)tst-wctype.out: tst-wctype.sh $(objpfx)tst-wctype \
$(objpfx)sort-test.out tst-wctype.input \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)tst-digits.out: $(objpfx)tst-locale.out
$(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
endif
Modified: fsf/trunk/libc/localedata/gen-locale.sh
==============================================================================
--- fsf/trunk/libc/localedata/gen-locale.sh (original)
+++ fsf/trunk/libc/localedata/gen-locale.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Generate test locale files.
-# Copyright (C) 2000,01,02 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx="$1"; shift
localedef="$1"; shift
Modified: fsf/trunk/libc/localedata/sort-test.sh
==============================================================================
--- fsf/trunk/libc/localedata/sort-test.sh (original)
+++ fsf/trunk/libc/localedata/sort-test.sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test collation using xfrm-test.
+# Copyright (C) 1997-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
run_program_prefix=$1; shift
Modified: fsf/trunk/libc/localedata/tst-ctype.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-ctype.sh (original)
+++ fsf/trunk/libc/localedata/tst-ctype.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the implementation of the isxxx() and toxxx() functions.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
tst_ctype=$1; shift
Modified: fsf/trunk/libc/localedata/tst-fmon.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-fmon.sh (original)
+++ fsf/trunk/libc/localedata/tst-fmon.sh Tue Sep 25 14:11:37 2012
@@ -1,9 +1,8 @@
#! /bin/sh
# Testing the implementation of strfmon(3).
-# Copyright (C) 1996-1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jochen Hein <jochen.hein@xxxxxxxxxxxxxxxxx>, 1997.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/localedata/tst-langinfo.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-langinfo.sh (original)
+++ fsf/trunk/libc/localedata/tst-langinfo.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test nl_langinfo.
-# Copyright (C) 2000, 2001, 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/localedata/tst-locale.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-locale.sh (original)
+++ fsf/trunk/libc/localedata/tst-locale.sh Tue Sep 25 14:11:37 2012
@@ -1,9 +1,8 @@
#! /bin/sh
# Testing the implementation of localedata.
-# Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger, <aj@xxxxxxxxxxxxxxxxxxxxxx>, 1998.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
localedef=$1; shift
Modified: fsf/trunk/libc/localedata/tst-mbswcs.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-mbswcs.sh (original)
+++ fsf/trunk/libc/localedata/tst-mbswcs.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the implementation of the mb*towc*() and wc*tomb*() functions.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
run_program_prefix=$1; shift
Modified: fsf/trunk/libc/localedata/tst-numeric.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-numeric.sh (original)
+++ fsf/trunk/libc/localedata/tst-numeric.sh Tue Sep 25 14:11:37 2012
@@ -1,9 +1,8 @@
#! /bin/sh
# Testing the implementation of LC_NUMERIC and snprintf(3).
-# Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jochen Hein <jochen.hein@xxxxxxxxxxxxxxxxx>, 1997.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/localedata/tst-rpmatch.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-rpmatch.sh (original)
+++ fsf/trunk/libc/localedata/tst-rpmatch.sh Tue Sep 25 14:11:37 2012
@@ -1,6 +1,6 @@
#! /bin/sh -f
#
-# Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library and contains tests for
# the rpmatch(3)-implementation.
# contributed by Jochen Hein <jochen.hein@xxxxxxxxxxxxxxxxx>
@@ -17,6 +17,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
tst_rpmatch=$2
Modified: fsf/trunk/libc/localedata/tst-trans.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-trans.sh (original)
+++ fsf/trunk/libc/localedata/tst-trans.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test character mapping definitions.
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/localedata/tst-wctype.sh
==============================================================================
--- fsf/trunk/libc/localedata/tst-wctype.sh (original)
+++ fsf/trunk/libc/localedata/tst-wctype.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test locale-define character classes.
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/malloc/Makefile
==============================================================================
--- fsf/trunk/libc/malloc/Makefile (original)
+++ fsf/trunk/libc/malloc/Makefile Tue Sep 25 14:11:37 2012
@@ -109,7 +109,7 @@
ifneq ($(PERL),no)
tests: $(objpfx)tst-mtrace.out
$(objpfx)tst-mtrace.out: tst-mtrace.sh $(objpfx)tst-mtrace
- $(SHELL) -e $< $(common-objpfx)
+ $(SHELL) $< $(common-objpfx)
endif
endif
endif
Modified: fsf/trunk/libc/malloc/arena.c
==============================================================================
--- fsf/trunk/libc/malloc/arena.c (original)
+++ fsf/trunk/libc/malloc/arena.c Tue Sep 25 14:11:37 2012
@@ -18,6 +18,9 @@
not, see <http://www.gnu.org/licenses/>. */
#include <stdbool.h>
+
+/* Get the implementation for check_may_shrink_heap. */
+#include <malloc-sysdep.h>
/* Compile-time constants. */
@@ -621,9 +624,9 @@
new_size = (long)h->size - diff;
if(new_size < (long)sizeof(*h))
return -1;
- /* Try to re-map the extra heap space freshly to save memory, and
- make it inaccessible. */
- if (__builtin_expect (__libc_enable_secure, 0))
+ /* Try to re-map the extra heap space freshly to save memory, and make it
+ inaccessible. See malloc-sysdep.h to know when this is true. */
+ if (__builtin_expect (check_may_shrink_heap (), 0))
{
if((char *)MMAP((char *)h + new_size, diff, PROT_NONE,
MAP_FIXED) == (char *) MAP_FAILED)
Modified: fsf/trunk/libc/malloc/tst-mtrace.sh
==============================================================================
--- fsf/trunk/libc/malloc/tst-mtrace.sh (original)
+++ fsf/trunk/libc/malloc/tst-mtrace.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the mtrace function.
-# Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Tue Sep 25 14:11:37 2012
@@ -1,3 +1,11 @@
+2012-09-24 Dmitry V. Levin <ldv@xxxxxxxxxxxx>
+
+ * tst-tls6.sh: Add "set -e".
+ * Makefile: Do not specify -e option when running testsuite
+ shell scripts.
+
+ * tst-tls6.sh: Add copyright header.
+
2012-09-24 H.J. Lu <hongjiu.lu@xxxxxxxxx>
* sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
Modified: fsf/trunk/libc/nptl/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/Makefile (original)
+++ fsf/trunk/libc/nptl/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2008,2009,2010,2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 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
@@ -472,7 +472,7 @@
$(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
$(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
$(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
- $(SHELL) -e tst-tls6.sh $(common-objpfx) $(elf-objpfx) \
+ $(SHELL) $< $(common-objpfx) $(elf-objpfx) \
$(rtld-installed-name)
endif
Modified: fsf/trunk/libc/nptl/tst-tls6.sh
==============================================================================
--- fsf/trunk/libc/nptl/tst-tls6.sh (original)
+++ fsf/trunk/libc/nptl/tst-tls6.sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,23 @@
-#!/bin/sh
+#! /bin/sh
+# A tls test.
+# Copyright (C) 2003-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
elf_objpfx=$1; shift
Modified: fsf/trunk/libc/posix/Makefile
==============================================================================
--- fsf/trunk/libc/posix/Makefile (original)
+++ fsf/trunk/libc/posix/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2007,2009,2010,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 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
@@ -117,10 +117,10 @@
ifeq (yes,$(build-shared))
tests: $(objpfx)globtest.out $(objpfx)wordexp-tst.out
$(objpfx)globtest.out: globtest.sh $(objpfx)globtest
- $(SHELL) -e globtest.sh $(common-objpfx) $(elf-objpfx) \
+ $(SHELL) $< $(common-objpfx) $(elf-objpfx) \
$(rtld-installed-name)
$(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
- $(SHELL) -e wordexp-tst.sh $(common-objpfx) $(elf-objpfx) \
+ $(SHELL) $< $(common-objpfx) $(elf-objpfx) \
$(rtld-installed-name)
endif
endif
@@ -276,7 +276,7 @@
$(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@
$(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
- $(SHELL) -e $< $(common-objpfx) $(elf-objpfx) $(rtld-installed-name)
+ $(SHELL) $< $(common-objpfx) $(elf-objpfx) $(rtld-installed-name)
ifeq (yes,$(build-shared))
$(objpfx)tst-regex: $(common-objpfx)rt/librt.so
Modified: fsf/trunk/libc/posix/globtest.sh
==============================================================================
--- fsf/trunk/libc/posix/globtest.sh (original)
+++ fsf/trunk/libc/posix/globtest.sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,23 @@
#! /bin/bash
+# Test for glob(3).
+# Copyright (C) 1997-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
elf_objpfx=$1; shift
Modified: fsf/trunk/libc/posix/tst-getconf.sh
==============================================================================
--- fsf/trunk/libc/posix/tst-getconf.sh (original)
+++ fsf/trunk/libc/posix/tst-getconf.sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test for getconf(1).
+# Copyright (C) 2001-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
elf_objpfx=$1; shift
Modified: fsf/trunk/libc/posix/wordexp-tst.sh
==============================================================================
--- fsf/trunk/libc/posix/wordexp-tst.sh (original)
+++ fsf/trunk/libc/posix/wordexp-tst.sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,23 @@
-#!/bin/sh
+#! /bin/sh
+# Test for wordexp(3).
+# Copyright (C) 1998-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
# Some of these tests may look a little weird.
# The first parameter to wordexp-test is what it gives to wordexp.
Modified: fsf/trunk/libc/stdio-common/Makefile
==============================================================================
--- fsf/trunk/libc/stdio-common/Makefile (original)
+++ fsf/trunk/libc/stdio-common/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2009, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 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
@@ -68,12 +68,12 @@
tests: do-tst-unbputc do-tst-printf
do-tst-unbputc: $(objpfx)tst-unbputc.out
-$(objpfx)tst-unbputc.out: $(objpfx)tst-unbputc tst-unbputc.sh
- $(SHELL) -e tst-unbputc.sh $(common-objpfx) '$(run-program-prefix)'
+$(objpfx)tst-unbputc.out: tst-unbputc.sh $(objpfx)tst-unbputc
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
do-tst-printf: $(objpfx)tst-printf.out
-$(objpfx)tst-printf.out: $(objpfx)tst-printf tst-printf.sh
- $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
+$(objpfx)tst-printf.out: tst-printf.sh $(objpfx)tst-printf
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
CFLAGS-vfprintf.c = -Wno-uninitialized
Modified: fsf/trunk/libc/stdio-common/tst-printf.sh
==============================================================================
--- fsf/trunk/libc/stdio-common/tst-printf.sh (original)
+++ fsf/trunk/libc/stdio-common/tst-printf.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing of printf.
-# Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
run_program_prefix=$1; shift
Modified: fsf/trunk/libc/stdio-common/tst-unbputc.sh
==============================================================================
--- fsf/trunk/libc/stdio-common/tst-unbputc.sh (original)
+++ fsf/trunk/libc/stdio-common/tst-unbputc.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the stdio implementation
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
run_program_prefix=$1; shift
Modified: fsf/trunk/libc/stdlib/Makefile
==============================================================================
--- fsf/trunk/libc/stdlib/Makefile (original)
+++ fsf/trunk/libc/stdlib/Makefile Tue Sep 25 14:11:37 2012
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2009, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 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
@@ -135,7 +135,7 @@
$(native-compile)
$(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
$(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
LDFLAGS-tst-putenv = $(no-as-needed)
Modified: fsf/trunk/libc/stdlib/tst-fmtmsg.sh
==============================================================================
--- fsf/trunk/libc/stdlib/tst-fmtmsg.sh (original)
+++ fsf/trunk/libc/stdlib/tst-fmtmsg.sh Tue Sep 25 14:11:37 2012
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of fmtmsg function family.
-# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 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
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1
run_program_prefix=$2
Modified: fsf/trunk/libc/sysdeps/generic/_G_config.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/_G_config.h (original)
+++ fsf/trunk/libc/sysdeps/generic/_G_config.h Tue Sep 25 14:11:37 2012
@@ -18,7 +18,6 @@
# define __need_wint_t
#endif
#include <wchar.h>
-#define _G_size_t size_t
typedef struct
{
__off_t __pos;
@@ -29,13 +28,7 @@
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
-#define _G_ssize_t __ssize_t
-#define _G_off_t __off_t
#define _G_off64_t __off_t
-#define _G_pid_t __pid_t
-#define _G_uid_t __uid_t
-#define _G_wchar_t wchar_t
-#define _G_wint_t wint_t
#define _G_stat64 stat
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
Added: fsf/trunk/libc/sysdeps/generic/malloc-sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/malloc-sysdep.h (added)
+++ fsf/trunk/libc/sysdeps/generic/malloc-sysdep.h Tue Sep 25 14:11:37 2012
@@ -1,0 +1,25 @@
+/* System-specific malloc support functions. Generic version.
+ Copyright (C) 2012 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Force an unmap when the heap shrinks in a secure exec. This ensures that
+ the old data pages immediately cease to be accessible. */
+static inline bool
+check_may_shrink_heap (void)
+{
+ return __libc_enable_secure;
+}
Modified: fsf/trunk/libc/sysdeps/gnu/_G_config.h
==============================================================================
--- fsf/trunk/libc/sysdeps/gnu/_G_config.h (original)
+++ fsf/trunk/libc/sysdeps/gnu/_G_config.h Tue Sep 25 14:11:37 2012
@@ -18,7 +18,6 @@
# define __need_wint_t
#endif
#include <wchar.h>
-#define _G_size_t size_t
typedef struct
{
__off_t __pos;
@@ -29,13 +28,7 @@
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
-#define _G_ssize_t __ssize_t
-#define _G_off_t __off_t
#define _G_off64_t __off64_t
-#define _G_pid_t __pid_t
-#define _G_uid_t __uid_t
-#define _G_wchar_t wchar_t
-#define _G_wint_t wint_t
#define _G_stat64 stat64
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
Modified: fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h Tue Sep 25 14:11:37 2012
@@ -18,7 +18,6 @@
# define __need_wint_t
#endif
#include <wchar.h>
-#define _G_size_t size_t
typedef struct
{
__off_t __pos;
@@ -29,13 +28,7 @@
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
-#define _G_ssize_t __ssize_t
-#define _G_off_t __off_t
#define _G_off64_t __off64_t
-#define _G_pid_t __pid_t
-#define _G_uid_t __uid_t
-#define _G_wchar_t wchar_t
-#define _G_wint_t wint_t
#define _G_stat64 stat64
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/malloc-sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/malloc-sysdep.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/malloc-sysdep.h Tue Sep 25 14:11:37 2012
@@ -1,0 +1,57 @@
+/* System-specific malloc support functions. Linux version.
+ Copyright (C) 2012 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fcntl.h>
+#include <not-cancel.h>
+
+/* The Linux kernel overcommits address space by default and if there is not
+ enough memory available, it uses various parameters to decide the process to
+ kill. It is however possible to disable or curb this overcommit behavior
+ by setting the proc sysctl vm.overcommit_memory to the value '2' and with
+ that, a process is only allowed to use the maximum of a pre-determined
+ fraction of the total address space. In such a case, we want to make sure
+ that we are judicious with our heap usage as well, and explicitly give away
+ the freed top of the heap to reduce our commit charge. See the proc(5) man
+ page to know more about overcommit behavior.
+
+ Other than that, we also force an unmap in a secure exec. */
+static inline bool
+check_may_shrink_heap (void)
+{
+ static int may_shrink_heap = -1;
+
+ if (__builtin_expect (may_shrink_heap >= 0, 1))
+ return may_shrink_heap;
+
+ may_shrink_heap = __libc_enable_secure;
+
+ if (__builtin_expect (may_shrink_heap == 0, 1))
+ {
+ int fd = open_not_cancel_2 ("/proc/sys/vm/overcommit_memory",
+ O_RDONLY | O_CLOEXEC);
+ if (fd >= 0)
+ {
+ char val;
+ ssize_t n = read_not_cancel (fd, &val, 1);
+ may_shrink_heap = n > 0 && val == '2';
+ close_not_cancel_no_status (fd);
+ }
+ }
+
+ return may_shrink_heap;
+}
Modified: fsf/trunk/libc/sysdeps/x86_64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/Makefile (original)
+++ fsf/trunk/libc/sysdeps/x86_64/Makefile Tue Sep 25 14:11:37 2012
@@ -41,7 +41,7 @@
tests: $(objpfx)tst-xmmymm.out
$(objpfx)tst-xmmymm.out: ../sysdeps/x86_64/tst-xmmymm.sh $(objpfx)ld.so
@echo "Checking ld.so for SSE register use. This will take a few seconds..."
- $(SHELL) -e $< $(objpfx) > $@
+ $(SHELL) $< $(objpfx) > $@
endif
ifeq ($(subdir),csu)
Modified: fsf/trunk/libc/sysdeps/x86_64/tst-xmmymm.sh
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/tst-xmmymm.sh (original)
+++ fsf/trunk/libc/sysdeps/x86_64/tst-xmmymm.sh Tue Sep 25 14:11:37 2012
@@ -1,4 +1,24 @@
#! /bin/bash
+# Make sure no code in ld.so uses xmm/ymm registers on x86-64.
+# Copyright (C) 2009-2012 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
+
objpfx="$1"
tmp=$(mktemp ${objpfx}tst-xmmymm.XXXXXX)
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits