[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r12231 - in /branches/eglibc-2_11/libc: ./ elf/ hurd/ hurd/hurd/ locale/programs/ malloc/ manual/ nis/nss_compat/ nptl/ nptl...
- To: commits@xxxxxxxxxx
- Subject: [commits] r12231 - in /branches/eglibc-2_11/libc: ./ elf/ hurd/ hurd/hurd/ locale/programs/ malloc/ manual/ nis/nss_compat/ nptl/ nptl...
- From: joseph@xxxxxxxxxx
- Date: Mon, 06 Dec 2010 20:55:12 -0000
Author: joseph
Date: Mon Dec 6 12:55:10 2010
New Revision: 12231
Log:
Merge changes between r11982 and r12230 from /fsf/glibc-2_11-branch.
Added:
branches/eglibc-2_11/libc/nptl/sysdeps/unix/sysv/linux/i386/Makefile
- copied unchanged from r12230, fsf/glibc-2_11-branch/libc/nptl/sysdeps/unix/sysv/linux/i386/Makefile
branches/eglibc-2_11/libc/posix/bug-regex31.c
- copied unchanged from r12230, fsf/glibc-2_11-branch/libc/posix/bug-regex31.c
branches/eglibc-2_11/libc/posix/bug-regex31.input
- copied unchanged from r12230, fsf/glibc-2_11-branch/libc/posix/bug-regex31.input
branches/eglibc-2_11/libc/scripts/data/localplt-s390-linux-gnu.data
- copied unchanged from r12230, fsf/glibc-2_11-branch/libc/scripts/data/localplt-s390-linux-gnu.data
branches/eglibc-2_11/libc/scripts/data/localplt-s390x-linux-gnu.data
- copied unchanged from r12230, fsf/glibc-2_11-branch/libc/scripts/data/localplt-s390x-linux-gnu.data
branches/eglibc-2_11/libc/sysdeps/i386/elf/Makefile
- copied unchanged from r12230, fsf/glibc-2_11-branch/libc/sysdeps/i386/elf/Makefile
Modified:
branches/eglibc-2_11/libc/.gitattributes
branches/eglibc-2_11/libc/ChangeLog
branches/eglibc-2_11/libc/INSTALL
branches/eglibc-2_11/libc/Makeconfig
branches/eglibc-2_11/libc/config.make.in
branches/eglibc-2_11/libc/configure
branches/eglibc-2_11/libc/configure.in
branches/eglibc-2_11/libc/elf/Makefile
branches/eglibc-2_11/libc/elf/dl-load.c
branches/eglibc-2_11/libc/elf/dl-object.c
branches/eglibc-2_11/libc/elf/dl-open.c
branches/eglibc-2_11/libc/elf/dl-sysdep.c
branches/eglibc-2_11/libc/elf/ldconfig.c
branches/eglibc-2_11/libc/elf/rtld-Rules
branches/eglibc-2_11/libc/elf/rtld.c
branches/eglibc-2_11/libc/hurd/hurd/fd.h
branches/eglibc-2_11/libc/hurd/hurdselect.c
branches/eglibc-2_11/libc/hurd/lookup-at.c
branches/eglibc-2_11/libc/locale/programs/locale.c
branches/eglibc-2_11/libc/malloc/malloc.c
branches/eglibc-2_11/libc/malloc/mcheck.c
branches/eglibc-2_11/libc/manual/Makefile
branches/eglibc-2_11/libc/manual/arith.texi
branches/eglibc-2_11/libc/manual/install.texi
branches/eglibc-2_11/libc/manual/locale.texi
branches/eglibc-2_11/libc/manual/memory.texi
branches/eglibc-2_11/libc/nis/nss_compat/compat-initgroups.c
branches/eglibc-2_11/libc/nptl/ChangeLog
branches/eglibc-2_11/libc/nptl/Makefile
branches/eglibc-2_11/libc/posix/Makefile
branches/eglibc-2_11/libc/posix/fnmatch.c
branches/eglibc-2_11/libc/posix/fnmatch_loop.c
branches/eglibc-2_11/libc/posix/regcomp.c
branches/eglibc-2_11/libc/posix/tst-fnmatch.c
branches/eglibc-2_11/libc/resolv/res_init.c
branches/eglibc-2_11/libc/stdlib/strtod_l.c
branches/eglibc-2_11/libc/sysdeps/generic/ldsodefs.h
branches/eglibc-2_11/libc/sysdeps/i386/bits/byteswap.h
branches/eglibc-2_11/libc/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
branches/eglibc-2_11/libc/sysdeps/mach/hurd/linkat.c
branches/eglibc-2_11/libc/sysdeps/s390/s390-32/__longjmp.c
branches/eglibc-2_11/libc/sysdeps/s390/s390-64/__longjmp.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/check_pf.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getdents.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sys/swap.h
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname_r.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
branches/eglibc-2_11/libc/sysdeps/x86_64/bits/byteswap.h
branches/eglibc-2_11/libc/sysdeps/x86_64/cacheinfo.c
branches/eglibc-2_11/libc/version.h
Modified: branches/eglibc-2_11/libc/.gitattributes
==============================================================================
--- branches/eglibc-2_11/libc/.gitattributes (original)
+++ branches/eglibc-2_11/libc/.gitattributes Mon Dec 6 12:55:10 2010
@@ -1,1 +1,2 @@
timezone/* -whitespace
+INSTALL -whitespace
Modified: branches/eglibc-2_11/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_11/libc/ChangeLog (original)
+++ branches/eglibc-2_11/libc/ChangeLog Mon Dec 6 12:55:10 2010
@@ -1,3 +1,245 @@
+2010-05-31 Petr Baudis <pasky@xxxxxxx>
+
+ [BZ #11149]
+ * elf/ldconfig.c (main): Allow aux_cache_file open()ing to fail
+ silently even in the chroot mode.
+
+2010-05-31 Petr Baudis <pasky@xxxxxxx>
+
+ [BZ #10085]
+ * nis/nss_compat/compat-initgroups.c (internal_getgrent_r): Fix
+ initialization of skip_initgroups_dyn.
+
+2010-09-27 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ [BZ #11611]
+ * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS):
+ Mask out sign-bit copies when constructing f_fsid.
+
+2010-11-19 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/bits/mman.h: Define MAP_HUGETLB.
+ * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
+
+2010-11-16 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sys/swap.h (SWAP_FLAG_DISCARD): Define.
+
+2010-11-11 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * posix/fnmatch_loop.c (NEW_PATTERN): Fix use of alloca.
+ * posix/Makefile (tests): Add $(objpfx)tst-fnmatch-mem.
+ (tst-fnmatch-ENV): Set MALLOC_TRACE.
+ ($(objpfx)tst-fnmatch-mem): New rule.
+ (generated): Add tst-fnmatch-mem and tst-fnmatch.mtrace.
+ * posix/tst-fnmatch.c (main): Call mtrace.
+
+2010-08-09 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11883]
+ * posix/fnmatch.c: Keep track of alloca use and fall back on malloc.
+ * posix/fnmatch_loop.c: Likewise.
+
+2010-11-10 Luis Machado <luisgpm@xxxxxxxxxx>
+
+ * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (__ieee754_sqrtl): Force
+ signed comparison.
+
+2010-11-08 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12194]
+ * sysdeps/i386/bits/byteswap.h: Avoid warning in __bswap_16.
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
+
+2010-09-06 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * manual/Makefile: Don't mix pattern rules with normal rules.
+
+2010-08-12 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ [BZ #11904]
+ * locale/programs/locale.c (print_assignment): New function.
+ (show_locale_vars): Use it.
+
+2010-10-26 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/rtld.c (dl_main): Move assertion after the point where rtld map
+ is added to the list.
+
+2010-10-20 Andreas Krebbel <Andreas.Krebbel@xxxxxxxxxx>
+ Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * elf/dl-object.c (_dl_new_object): Don't append the new object to
+ the global list here. Move code to...
+ (_dl_add_to_namespace_list): ...here. New function.
+ * elf/rtld.c (dl_main): Invoke _dl_add_to_namespace_list.
+ * sysdeps/generic/ldsodefs.h (_dl_add_to_namespace_list): Declare.
+ * elf/dl-load.c (lose): Don't remove the element from the list.
+ (_dl_map_object_from_fd): Invoke _dl_add_to_namespace_list.
+ (_dl_map_object): Likewise.
+
+2010-10-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #12140]
+ * malloc/malloc.c (_int_free): Fill correct number of bytes when
+ perturbing.
+
+2010-09-09 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * Makeconfig (sysd-rules-patterns): Add rtld-%:rtld-%.
+ (sysd-rules-targets): Remove duplicates.
+ * elf/rtld-Rules ($(objpfx)rtld-%.os): Add pattern rules with
+ rtld-%.$o dependency.
+
+2010-10-18 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * elf/dl-open.c (dl_open_worker): Don't expand DST here, let
+ _dl_map_object do it.
+
+2010-10-15 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * scripts/data/localplt-s390-linux-gnu.data: New file.
+ * scripts/data/localplt-s390x-linux-gnu.data: New file.
+
+2010-10-12 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #12078]
+ * posix/regcomp.c (parse_branch): One more memory leak plugged.
+ * posix/bug-regex31.input: Add test case.
+
+2010-10-11 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * posix/bug-regex31.c: Rewrite to run multiple tests from stdin.
+ * posix/bug-regex31.input: New file.
+
+ [BZ #12078]
+ * posix/regcomp.c (parse_branch): Free memory when allocation failed.
+ (parse_sub_exp): Fix last change, use postorder.
+
+ * posix/bug-regex31.c: New file.
+ * posix/Makefile: Add rules to build and run bug-regex31.
+
+ * posix/regcomp.c (parse_bracket_exp): Add missing re_free calls.
+
+ [BZ #12078]
+ * posix/regcomp.c (parse_sub_exp): Free tree data when it is not used.
+
+ [BZ #12093]
+ * sysdeps/unix/sysv/linux/check_pf.c (__check_pf): ->ifa_addr might
+ be NULL.
+
+2010-09-15 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): When
+ implementing getdents64 using getdents syscall, set d_type if
+ __ASSUME_GETDENTS32_D_TYPE.
+
+2010-09-14 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Define register
+ variables after CHECK_SP call.
+ * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise.
+
+2010-09-08 Chung-Lin Tang <cltang@xxxxxxxxxxxxxxxx>
+ Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11968]
+ * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+ (____longjmp_chk): Use %ebx for saving value across system call.
+ Add unwind info.
+
+2010-08-31 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sparc/sys/epoll.h (epoll_create2): Delete.
+ (epoll_create1): Declare.
+
+ * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Fix typo.
+
+2010-08-31 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ [BZ #7066]
+ * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix array overflow when
+ shifting retval into place.
+
+2010-09-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * resolv/res_init.c (__res_vinit): Count the default server we added.
+
+2010-08-25 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #10851]
+ * resolv/res_init.c (__res_vinit): When no server address at all
+ is given default to loopback.
+
+2010-08-12 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/i386/elf/Makefile: New file.
+
+2010-07-31 Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
+
+ * hurd/hurdselect.c (_hurd_select): Round timeout up instead of down
+ when converting to ms.
+
+2010-07-29 Roland McGrath <roland@xxxxxxxxxx>
+
+ [BZ 11856]
+ * manual/locale.texi (Yes-or-No Questions): Fix example code.
+
+2010-07-27 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * manual/memory.texi (Malloc Tunable Parameters): Document
+ M_PERTURB.
+
+2010-07-26 Roland McGrath <roland@xxxxxxxxxx>
+
+ [BZ #11840]
+ * configure.in (-fgnu89-inline check): Set and substitute
+ gnu89_inline, not libc_cv_gnu89_inline.
+ * configure: Regenerated.
+ * config.make.in (gnu89-inline-CFLAGS): Use @gnu89_inline@.
+
+2010-07-20 Roland McGrath <roland@xxxxxxxxxx>
+
+ * elf/dl-sysdep.c (_dl_important_hwcaps): Add dsocaps mask to
+ dl_hwcap_mask as well as dl_hwcap. Without this, dsocaps matching in
+ ld.so.cache was broken. With it, there is no way to disable dsocaps
+ like LD_HWCAP_MASK can disable hwcaps.
+
+2010-07-05 Roland McGrath <roland@xxxxxxxxxx>
+
+ * manual/arith.texi (Rounding Functions): Fix rint description
+ implicit in round description.
+
+2010-07-02 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * elf/Makefile: Fix linking for a few tests to make recent linker
+ happy.
+
+2010-06-02 Emilio Pozuelo Monfort <pochu27@xxxxxxxxx>
+
+ * hurd/lookup-at.c (__file_name_lookup_at): Accept
+ AT_SYMLINK_FOLLOW in AT_FLAGS. Fail with EINVAL if both
+ AT_SYMLINK_FOLLOW and AT_SYMLINK_NOFOLLOW are present
+ in AT_FLAGS.
+ * hurd/hurd/fd.h (__file_name_lookup_at): Update comment.
+ * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS.
+
+2010-11-03 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #12191]
+ * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Round
+ __x86_64_data_cache_size_half, __x86_64_data_cache_size
+ __x86_64_shared_cache_size_half and __x86_64_shared_cache_size,
+ to multiple of 256 bytes.
+
+2010-11-03 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12167]
+ * sysdeps/unix/sysv/linux/ttyname.c (ttyname): Recognize new mangling
+ of inacessible symlinks. Verify result of symlink before returning it.
+ * sysdeps/unix/sysv/linux/ttyname_r.c (__ttyname_r): Likewise.
+ Patch mostly by Miklos Szeredi <miklos@xxxxxxxxxx>.
+
2010-10-25 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #12159]
@@ -32,6 +274,9 @@
when skipping input due to the shift table.
2010-10-03 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12005]
+ * malloc/mcheck.c: Handle large requests.
[BZ #12077]
* sysdeps/x86_64/strcmp.S: Fix handling of remaining bytes in buffer
Modified: branches/eglibc-2_11/libc/INSTALL
==============================================================================
--- branches/eglibc-2_11/libc/INSTALL (original)
+++ branches/eglibc-2_11/libc/INSTALL Mon Dec 6 12:55:10 2010
@@ -329,11 +329,12 @@
Check the FAQ for any special compiler issues on particular
platforms.
- * GNU `binutils' 2.15 or later
+ * GNU `binutils'
You must use GNU `binutils' (as and ld) to build the GNU C library.
No other assembler or linker has the necessary functionality at the
- moment.
+ moment. The configure scripts checks for the appropriate version
+ for the platform. Too-old versions will prevent building glibc.
* GNU `texinfo' 3.12f
Modified: branches/eglibc-2_11/libc/Makeconfig
==============================================================================
--- branches/eglibc-2_11/libc/Makeconfig (original)
+++ branches/eglibc-2_11/libc/Makeconfig Mon Dec 6 12:55:10 2010
@@ -694,7 +694,7 @@
-include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
$(CPPFLAGS-$(suffix $@)) \
$(foreach lib,$(libof-$(basename $(@F))) \
- $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
+ $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
@@ -983,7 +983,7 @@
# emitted into sysd-rules. A sysdeps Makeconfig fragment can
# add its own special object file prefix to this list with e.g. foo-%:%
# to have foo-*.? compiled from *.? using $(foo-CPPFLAGS).
-sysd-rules-patterns := %:% rtld-%:% m_%:s_%
+sysd-rules-patterns := %:% rtld-%:rtld-% rtld-%:% m_%:s_%
# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
@@ -992,8 +992,8 @@
endif
# Compute just the target patterns. Makeconfig has set sysd-rules-patterns.
-sysd-rules-targets := $(foreach p,$(sysd-rules-patterns),\
- $(firstword $(subst :, ,$p)))
+sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
+ $(firstword $(subst :, ,$p))))
endif # Makeconfig not yet included
Modified: branches/eglibc-2_11/libc/config.make.in
==============================================================================
--- branches/eglibc-2_11/libc/config.make.in (original)
+++ branches/eglibc-2_11/libc/config.make.in Mon Dec 6 12:55:10 2010
@@ -58,7 +58,7 @@
enable-check-abi = @enable_check_abi@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
-gnu89-inline-CFLAGS = @libc_cv_gnu89_inline@
+gnu89-inline-CFLAGS = @gnu89_inline@
have-ssp = @libc_cv_ssp@
have-selinux = @have_selinux@
have-libaudit = @have_libaudit@
Modified: branches/eglibc-2_11/libc/configure
==============================================================================
--- branches/eglibc-2_11/libc/configure (original)
+++ branches/eglibc-2_11/libc/configure Mon Dec 6 12:55:10 2010
@@ -681,7 +681,7 @@
exceptions
no_whole_archive
libc_cv_have_initfini
-libc_cv_gnu89_inline
+gnu89_inline
libc_cv_ssp
fno_unit_at_a_time
libc_cv_hashstyle
@@ -6937,9 +6937,9 @@
{ $as_echo "$as_me:$LINENO: result: $libc_cv_gnu89_inline" >&5
$as_echo "$libc_cv_gnu89_inline" >&6; }
if test $libc_cv_gnu89_inline = yes; then
- libc_cv_gnu89_inline=-fgnu89-inline
-else
- libc_cv_gnu89_inline=
+ gnu89_inline=-fgnu89-inline
+else
+ gnu89_inline=
fi
Modified: branches/eglibc-2_11/libc/configure.in
==============================================================================
--- branches/eglibc-2_11/libc/configure.in (original)
+++ branches/eglibc-2_11/libc/configure.in Mon Dec 6 12:55:10 2010
@@ -1773,11 +1773,11 @@
fi
rm -f conftest*])
if test $libc_cv_gnu89_inline = yes; then
- libc_cv_gnu89_inline=-fgnu89-inline
-else
- libc_cv_gnu89_inline=
-fi
-AC_SUBST(libc_cv_gnu89_inline)
+ gnu89_inline=-fgnu89-inline
+else
+ gnu89_inline=
+fi
+AC_SUBST(gnu89_inline)
if test $elf != yes; then
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
Modified: branches/eglibc-2_11/libc/elf/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/elf/Makefile (original)
+++ branches/eglibc-2_11/libc/elf/Makefile Mon Dec 6 12:55:10 2010
@@ -766,11 +766,11 @@
$(objpfx)tst-tls9: $(libdl)
$(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
-$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so
-
-$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so
-
-$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so
+$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so $(objpfx)tst-tlsmod7.so
+
+$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so $(objpfx)tst-tlsmod9.so
+
+$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so $(objpfx)tst-tlsmod11.so
$(objpfx)tst-tls13: $(libdl)
$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
Modified: branches/eglibc-2_11/libc/elf/dl-load.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-load.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-load.c Mon Dec 6 12:55:10 2010
@@ -801,19 +801,7 @@
/* The file might already be closed. */
if (fd != -1)
(void) __close (fd);
- if (l != NULL)
- {
- /* Remove the stillborn object from the list and free it. */
- assert (l->l_next == NULL);
- if (l->l_prev == NULL)
- /* No other module loaded. This happens only in the static library,
- or in rtld under --verify. */
- GL(dl_ns)[l->l_ns]._ns_loaded = NULL;
- else
- l->l_prev->l_next = NULL;
- --GL(dl_ns)[l->l_ns]._ns_nloaded;
- free (l);
- }
+ free (l);
free (realname);
if (r != NULL)
@@ -897,6 +885,9 @@
/* No need to bump the refcount of the real object, ld.so will
never be unloaded. */
__close (fd);
+
+ /* Add the map for the mirrored object to the object list. */
+ _dl_add_to_namespace_list (l, nsid);
return l;
}
@@ -1491,6 +1482,9 @@
&& l->l_info[DT_SONAME] != NULL)
add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val));
+
+ /* Now that the object is fully initialized add it to the object list. */
+ _dl_add_to_namespace_list (l, nsid);
#ifdef SHARED
/* Auditing checkpoint: we have a new object. */
@@ -2206,7 +2200,7 @@
have. */
static const Elf_Symndx dummy_bucket = STN_UNDEF;
- /* Enter the new object in the list of loaded objects. */
+ /* Allocate a new object map. */
if ((name_copy = local_strdup (name)) == NULL
|| (l = _dl_new_object (name_copy, name, type, loader,
mode, nsid)) == NULL)
@@ -2223,6 +2217,9 @@
l->l_buckets = &dummy_bucket;
l->l_nbuckets = 1;
l->l_relocated = 1;
+
+ /* Enter the object in the object list. */
+ _dl_add_to_namespace_list (l, nsid);
return l;
}
Modified: branches/eglibc-2_11/libc/elf/dl-object.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-object.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-object.c Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Storage management for the chain of loaded shared objects.
- Copyright (C) 1995-2002,2004,2006-2008,2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2004,2006-2009,2010 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
@@ -26,16 +26,36 @@
#include <assert.h>
+/* Add the new link_map NEW to the end of the namespace list. */
+void
+internal_function
+_dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
+{
+ if (GL(dl_ns)[nsid]._ns_loaded != NULL)
+ {
+ struct link_map *l = GL(dl_ns)[nsid]._ns_loaded;
+ while (l->l_next != NULL)
+ l = l->l_next;
+ new->l_prev = l;
+ /* new->l_next = NULL; Would be necessary but we use calloc. */
+ l->l_next = new;
+ }
+ else
+ GL(dl_ns)[nsid]._ns_loaded = new;
+ ++GL(dl_ns)[nsid]._ns_nloaded;
+ new->l_serial = GL(dl_load_adds);
+ ++GL(dl_load_adds);
+}
+
+
/* Allocate a `struct link_map' for a new object being loaded,
and enter it into the _dl_loaded list. */
-
struct link_map *
internal_function
_dl_new_object (char *realname, const char *libname, int type,
struct link_map *loader, int mode, Lmid_t nsid)
{
struct link_map *l;
- int idx;
size_t libname_len = strlen (libname) + 1;
struct link_map *new;
struct libname_list *newname;
@@ -94,25 +114,11 @@
new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]);
/* Counter for the scopes we have to handle. */
- idx = 0;
+ int idx = 0;
if (GL(dl_ns)[nsid]._ns_loaded != NULL)
- {
- l = GL(dl_ns)[nsid]._ns_loaded;
- while (l->l_next != NULL)
- l = l->l_next;
- new->l_prev = l;
- /* new->l_next = NULL; Would be necessary but we use calloc. */
- l->l_next = new;
-
- /* Add the global scope. */
- new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
- }
- else
- GL(dl_ns)[nsid]._ns_loaded = new;
- ++GL(dl_ns)[nsid]._ns_nloaded;
- new->l_serial = GL(dl_load_adds);
- ++GL(dl_load_adds);
+ /* Add the global scope. */
+ new->l_scope[idx++] = &GL(dl_ns)[nsid]._ns_loaded->l_searchlist;
/* If we have no loader the new object acts as it. */
if (loader == NULL)
Modified: branches/eglibc-2_11/libc/elf/dl-open.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-open.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-open.c Mon Dec 6 12:55:10 2010
@@ -220,35 +220,6 @@
assert (_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT);
- /* Maybe we have to expand a DST. */
- if (__builtin_expect (dst != NULL, 0))
- {
- size_t len = strlen (file);
-
- /* Determine how much space we need. We have to allocate the
- memory locally. */
- size_t required = DL_DST_REQUIRED (call_map, file, len,
- _dl_dst_count (dst, 0));
-
- /* Get space for the new file name. */
- char *new_file = (char *) alloca (required + 1);
-
- /* Generate the new file name. */
- _dl_dst_substitute (call_map, file, new_file, 0);
-
- /* If the substitution failed don't try to load. */
- if (*new_file == '\0')
- _dl_signal_error (0, "dlopen", NULL,
- N_("empty dynamic string token substitution"));
-
- /* Now we have a new file name. */
- file = new_file;
-
- /* It does not matter whether call_map is set even if we
- computed it only because of the DST. Since the path contains
- a slash the value is not used. See dl-load.c. */
- }
-
/* Load the named object. */
struct link_map *new;
args->map = new = _dl_map_object (call_map, file, lt_loaded, 0,
Modified: branches/eglibc-2_11/libc/elf/dl-sysdep.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-sysdep.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-sysdep.c Mon Dec 6 12:55:10 2010
@@ -424,6 +424,11 @@
{
const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
+ /* Note that we add the dsocaps to the set already chosen by the
+ LD_HWCAP_MASK environment variable (or default HWCAP_IMPORTANT).
+ So there is no way to request ignoring an OS-supplied dsocap
+ string and bit like you can ignore an OS-supplied HWCAP bit. */
+ GLRO(dl_hwcap_mask) |= (uint64_t) mask << _DL_FIRST_EXTRA;
size_t len;
for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
{
Modified: branches/eglibc-2_11/libc/elf/ldconfig.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/ldconfig.c (original)
+++ branches/eglibc-2_11/libc/elf/ldconfig.c Mon Dec 6 12:55:10 2010
@@ -1362,14 +1362,9 @@
const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
if (opt_chroot)
- {
- aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
- if (aux_cache_file == NULL)
- error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
- _PATH_LDCONFIG_AUX_CACHE);
- }
-
- if (! opt_ignore_aux_cache)
+ aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
+
+ if (! opt_ignore_aux_cache && aux_cache_file)
load_aux_cache (aux_cache_file);
else
init_aux_cache ();
@@ -1379,7 +1374,8 @@
if (opt_build_cache)
{
save_cache (cache_file);
- save_aux_cache (aux_cache_file);
+ if (aux_cache_file)
+ save_aux_cache (aux_cache_file);
}
return 0;
Modified: branches/eglibc-2_11/libc/elf/rtld-Rules
==============================================================================
--- branches/eglibc-2_11/libc/elf/rtld-Rules (original)
+++ branches/eglibc-2_11/libc/elf/rtld-Rules Mon Dec 6 12:55:10 2010
@@ -1,6 +1,6 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.
-# Copyright (C) 2002, 2003, 2005, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002,2003,2005,2006,2008,2010 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
@@ -56,7 +56,7 @@
# Use the verbose option of ar and tar when not running silently.
ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
verbose := v
-else # -s
+else # -s
verbose :=
endif # not -s
@@ -93,6 +93,12 @@
# These are the basic compilation rules corresponding to the Makerules ones.
# The sysd-rules generated makefile already defines pattern rules for rtld-%
# targets built from sysdeps source files.
+$(objpfx)rtld-%.os: rtld-%.S $(before-compile)
+ $(compile-command.S) $(rtld-CPPFLAGS)
+$(objpfx)rtld-%.os: rtld-%.s $(before-compile)
+ $(compile-command.s) $(rtld-CPPFLAGS)
+$(objpfx)rtld-%.os: rtld-%.c $(before-compile)
+ $(compile-command.c) $(rtld-CPPFLAGS)
$(objpfx)rtld-%.os: %.S $(before-compile)
$(compile-command.S) $(rtld-CPPFLAGS)
$(objpfx)rtld-%.os: %.s $(before-compile)
@@ -101,6 +107,9 @@
$(compile-command.c) $(rtld-CPPFLAGS)
# The rules for generated source files.
+$(objpfx)rtld-%.os: $(objpfx)rtld-%.S $(before-compile); $(compile-command.S)
+$(objpfx)rtld-%.os: $(objpfx)rtld-%.s $(before-compile); $(compile-command.s)
+$(objpfx)rtld-%.os: $(objpfx)rtld-%.c $(before-compile); $(compile-command.c)
$(objpfx)rtld-%.os: $(objpfx)%.S $(before-compile); $(compile-command.S)
$(objpfx)rtld-%.os: $(objpfx)%.s $(before-compile); $(compile-command.s)
$(objpfx)rtld-%.os: $(objpfx)%.c $(before-compile); $(compile-command.c)
Modified: branches/eglibc-2_11/libc/elf/rtld.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/rtld.c (original)
+++ branches/eglibc-2_11/libc/elf/rtld.c Mon Dec 6 12:55:10 2010
@@ -1088,10 +1088,14 @@
main_map = _dl_new_object ((char *) "", "", lt_executable, NULL,
__RTLD_OPENEXEC, LM_ID_BASE);
assert (main_map != NULL);
- assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
main_map->l_phdr = phdr;
main_map->l_phnum = phnum;
main_map->l_entry = *user_entry;
+
+ /* Even though the link map is not yet fully initialized we can add
+ it to the map list since there are no possible users running yet. */
+ _dl_add_to_namespace_list (main_map, LM_ID_BASE);
+ assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
/* At this point we are in a bit of trouble. We would have to
fill in the values for l_dev and l_ino. But in general we
@@ -1235,7 +1239,7 @@
/* We were invoked directly, so the program might not have a
PT_INTERP. */
_dl_rtld_libname.name = GL(dl_rtld_map).l_name;
- /* _dl_rtld_libname.next = NULL; Already zero. */
+ /* _dl_rtld_libname.next = NULL; Already zero. */
GL(dl_rtld_map).l_libname = &_dl_rtld_libname;
}
else
@@ -1360,6 +1364,9 @@
l->l_libname->name = memcpy (copy, dsoname, len);
}
+ /* Add the vDSO to the object list. */
+ _dl_add_to_namespace_list (l, LM_ID_BASE);
+
/* Rearrange the list so this DSO appears after rtld_map. */
assert (l->l_next == NULL);
assert (l->l_prev == main_map);
Modified: branches/eglibc-2_11/libc/hurd/hurd/fd.h
==============================================================================
--- branches/eglibc-2_11/libc/hurd/hurd/fd.h (original)
+++ branches/eglibc-2_11/libc/hurd/hurd/fd.h Mon Dec 6 12:55:10 2010
@@ -254,8 +254,9 @@
const sigset_t *sigmask);
/* Variant of file_name_lookup used in *at function implementations.
- AT_FLAGS should contain only AT_SYMLINK_NOFOLLOW; other bits
- cause EINVAL. */
+ AT_FLAGS may only contain AT_SYMLINK_FOLLOW or AT_SYMLINK_NOFOLLOW,
+ which will remove and add O_NOLINK from FLAGS respectively.
+ Other bits cause EINVAL. */
extern file_t __file_name_lookup_at (int fd, int at_flags,
const char *file_name,
int flags, mode_t mode);
Modified: branches/eglibc-2_11/libc/hurd/hurdselect.c
==============================================================================
--- branches/eglibc-2_11/libc/hurd/hurdselect.c (original)
+++ branches/eglibc-2_11/libc/hurd/hurdselect.c Mon Dec 6 12:55:10 2010
@@ -52,7 +52,7 @@
int firstfd, lastfd;
mach_msg_timeout_t to = (timeout != NULL ?
(timeout->tv_sec * 1000 +
- timeout->tv_nsec / 1000000) :
+ (timeout->tv_nsec + 999999) / 1000000) :
0);
struct
{
Modified: branches/eglibc-2_11/libc/hurd/lookup-at.c
==============================================================================
--- branches/eglibc-2_11/libc/hurd/lookup-at.c (original)
+++ branches/eglibc-2_11/libc/hurd/lookup-at.c Mon Dec 6 12:55:10 2010
@@ -30,8 +30,14 @@
error_t err;
file_t result;
+ if ((at_flags & AT_SYMLINK_FOLLOW) && (at_flags & AT_SYMLINK_NOFOLLOW))
+ return (__hurd_fail (EINVAL), MACH_PORT_NULL);
+
flags |= (at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0;
at_flags &= ~AT_SYMLINK_NOFOLLOW;
+ if (at_flags & AT_SYMLINK_FOLLOW)
+ flags &= ~O_NOLINK;
+ at_flags &= ~AT_SYMLINK_FOLLOW;
if (at_flags != 0)
return (__hurd_fail (EINVAL), MACH_PORT_NULL);
Modified: branches/eglibc-2_11/libc/locale/programs/locale.c
==============================================================================
--- branches/eglibc-2_11/libc/locale/programs/locale.c (original)
+++ branches/eglibc-2_11/libc/locale/programs/locale.c Mon Dec 6 12:55:10 2010
@@ -765,6 +765,29 @@
twalk (all_data, print_names);
}
+/* Print a properly quoted assignment of NAME with VAL, using double
+ quotes iff DQUOTE is true. */
+static void
+print_assignment (const char *name, const char *val, bool dquote)
+{
+ printf ("%s=", name);
+ if (dquote)
+ putchar ('"');
+ while (*val != '\0')
+ {
+ size_t segment
+ = strcspn (val, dquote ? "$`\"\\" : "~|&;<>()$`\\\"' \t\n");
+ printf ("%.*s", (int) segment, val);
+ val += segment;
+ if (*val == '\0')
+ break;
+ putchar ('\\');
+ putchar (*val++);
+ }
+ if (dquote)
+ putchar ('"');
+ putchar ('\n');
+}
/* We have to show the contents of the environments determining the
locale. */
@@ -772,7 +795,7 @@
show_locale_vars (void)
{
size_t cat_no;
- const char *lcall = getenv ("LC_ALL");
+ const char *lcall = getenv ("LC_ALL") ? : "";
const char *lang = getenv ("LANG") ? : "";
auto void get_source (const char *name);
@@ -781,15 +804,15 @@
{
char *val = getenv (name);
- if ((lcall ?: "")[0] != '\0' || val == NULL)
- printf ("%s=\"%s\"\n", name,
- (lcall ?: "")[0] ? lcall : (lang ?: "")[0] ? lang : "POSIX");
+ if (lcall[0] != '\0' || val == NULL)
+ print_assignment (name, lcall[0] ? lcall : lang[0] ? lang : "POSIX",
+ true);
else
- printf ("%s=%s\n", name, val);
+ print_assignment (name, val, false);
}
/* LANG has to be the first value. */
- printf ("LANG=%s\n", lang);
+ print_assignment ("LANG", lang, false);
/* Now all categories in an unspecified order. */
for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
@@ -797,7 +820,7 @@
get_source (category[cat_no].name);
/* The last is the LC_ALL value. */
- printf ("LC_ALL=%s\n", lcall ? : "");
+ print_assignment ("LC_ALL", lcall, false);
}
Modified: branches/eglibc-2_11/libc/malloc/malloc.c
==============================================================================
--- branches/eglibc-2_11/libc/malloc/malloc.c (original)
+++ branches/eglibc-2_11/libc/malloc/malloc.c Mon Dec 6 12:55:10 2010
@@ -4850,7 +4850,7 @@
}
if (__builtin_expect (perturb_byte, 0))
- free_perturb (chunk2mem(p), size - SIZE_SZ);
+ free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
set_fastchunks(av);
fb = &fastbin (av, fastbin_index(size));
@@ -4938,7 +4938,7 @@
}
if (__builtin_expect (perturb_byte, 0))
- free_perturb (chunk2mem(p), size - SIZE_SZ);
+ free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
/* consolidate backward */
if (!prev_inuse(p)) {
Modified: branches/eglibc-2_11/libc/malloc/mcheck.c
==============================================================================
--- branches/eglibc-2_11/libc/malloc/mcheck.c (original)
+++ branches/eglibc-2_11/libc/malloc/mcheck.c Mon Dec 6 12:55:10 2010
@@ -1,5 +1,6 @@
/* Standard debugging hooks for `malloc'.
- Copyright (C) 1990-1997,1999,2000-2002,2007 Free Software Foundation, Inc.
+ Copyright (C) 1990-1997,1999,2000-2002,2007,2010
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written May 1989 by Mike Haertel.
@@ -25,6 +26,7 @@
# include <stdint.h>
# include <stdio.h>
# include <libintl.h>
+# include <errno.h>
#endif
/* Old hook values. */
@@ -209,6 +211,12 @@
if (pedantic)
mcheck_check_all ();
+ if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
+ {
+ __set_errno (ENOMEM);
+ return NULL;
+ }
+
__malloc_hook = old_malloc_hook;
if (old_malloc_hook != NULL)
hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
@@ -241,6 +249,12 @@
slop = (sizeof *hdr + alignment - 1) & -alignment;
+ if (size > ~((size_t) 0) - (slop + 1))
+ {
+ __set_errno (ENOMEM);
+ return NULL;
+ }
+
__memalign_hook = old_memalign_hook;
if (old_memalign_hook != NULL)
block = (*old_memalign_hook) (alignment, slop + size + 1, caller);
@@ -275,6 +289,12 @@
if (pedantic)
mcheck_check_all ();
+
+ if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1))
+ {
+ __set_errno (ENOMEM);
+ return NULL;
+ }
if (ptr)
{
Modified: branches/eglibc-2_11/libc/manual/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/manual/Makefile (original)
+++ branches/eglibc-2_11/libc/manual/Makefile Mon Dec 6 12:55:10 2010
@@ -243,7 +243,10 @@
.PHONY: stubs
stubs: $(objpfx)stubs
endif
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+$(objpfx)stubs ../po/manual.pot:
+ $(make-target-directory)
+ touch $@
+$(objpfx)stamp%:
$(make-target-directory)
touch $@
Modified: branches/eglibc-2_11/libc/manual/arith.texi
==============================================================================
--- branches/eglibc-2_11/libc/manual/arith.texi (original)
+++ branches/eglibc-2_11/libc/manual/arith.texi Mon Dec 6 12:55:10 2010
@@ -1407,7 +1407,8 @@
@comment ISO
@deftypefunx {long double} roundl (long double @var{x})
These functions are similar to @code{rint}, but they round halfway
-cases away from zero instead of to the nearest even integer.
+cases away from zero instead of to the nearest integer (or other
+current rounding mode).
@end deftypefun
@comment math.h
Modified: branches/eglibc-2_11/libc/manual/install.texi
==============================================================================
--- branches/eglibc-2_11/libc/manual/install.texi (original)
+++ branches/eglibc-2_11/libc/manual/install.texi Mon Dec 6 12:55:10 2010
@@ -348,11 +348,12 @@
Check the FAQ for any special compiler issues on particular platforms.
@item
-GNU @code{binutils} 2.15 or later
+GNU @code{binutils}
You must use GNU @code{binutils} (as and ld) to build the GNU C library.
No other assembler or linker has the necessary functionality at the
-moment.
+moment. The configure scripts checks for the appropriate version
+for the platform. Too-old versions will prevent building glibc.
@item
GNU @code{texinfo} 3.12f
Modified: branches/eglibc-2_11/libc/manual/locale.texi
==============================================================================
--- branches/eglibc-2_11/libc/manual/locale.texi (original)
+++ branches/eglibc-2_11/libc/manual/locale.texi Mon Dec 6 12:55:10 2010
@@ -1210,7 +1210,7 @@
/* @r{Prepare the @code{getline} call.} */
line = NULL;
len = 0;
- while (getline (&line, &len, stdout) >= 0)
+ while (getline (&line, &len, stdin) >= 0)
@{
/* @r{Check the response.} */
int res = rpmatch (line);
Modified: branches/eglibc-2_11/libc/manual/memory.texi
==============================================================================
--- branches/eglibc-2_11/libc/manual/memory.texi (original)
+++ branches/eglibc-2_11/libc/manual/memory.texi Mon Dec 6 12:55:10 2010
@@ -702,6 +702,11 @@
@item M_MMAP_MAX
The maximum number of chunks to allocate with @code{mmap}. Setting this
to zero disables all use of @code{mmap}.
+@item M_PERTURB
+If non-zero, memory blocks are filled with values depending on some
+low order bits of this parameter when they are allocated (except when
+allocated by @code{calloc}) and freed. This can be used to debug the
+use of uninitialized or freed heap memory.
@end table
@end deftypefun
Modified: branches/eglibc-2_11/libc/nis/nss_compat/compat-initgroups.c
==============================================================================
--- branches/eglibc-2_11/libc/nis/nss_compat/compat-initgroups.c (original)
+++ branches/eglibc-2_11/libc/nis/nss_compat/compat-initgroups.c Mon Dec 6 12:55:10 2010
@@ -474,17 +474,20 @@
/* If the selected module does not support getgrent_r or
initgroups_dyn, abort. We cannot find the needed group
entries. */
- if (nss_getgrent_r == NULL && nss_initgroups_dyn == NULL)
+ if (nss_initgroups_dyn == NULL || nss_getgrgid_r == NULL)
+ {
+ if (nss_setgrent != NULL)
+ {
+ nss_setgrent (1);
+ ent->need_endgrent = true;
+ }
+ ent->skip_initgroups_dyn = true;
+ }
+
+ if (ent->skip_initgroups_dyn && nss_getgrent_r == NULL)
return NSS_STATUS_UNAVAIL;
ent->files = false;
-
- if (nss_initgroups_dyn == NULL && nss_setgrent != NULL)
- {
- nss_setgrent (1);
- ent->need_endgrent = true;
- }
- ent->skip_initgroups_dyn = true;
return getgrent_next_nss (ent, buffer, buflen, user, group,
start, size, groupsp, limit, errnop);
Modified: branches/eglibc-2_11/libc/nptl/ChangeLog
==============================================================================
--- branches/eglibc-2_11/libc/nptl/ChangeLog (original)
+++ branches/eglibc-2_11/libc/nptl/ChangeLog Mon Dec 6 12:55:10 2010
@@ -1,3 +1,11 @@
+2010-08-12 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * nptl/sysdeps/unix/sysv/linux/i386/Makefile: New file.
+
+2010-07-01 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
+
2010-10-13 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #12113]
Modified: branches/eglibc-2_11/libc/nptl/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/nptl/Makefile (original)
+++ branches/eglibc-2_11/libc/nptl/Makefile Mon Dec 6 12:55:10 2010
@@ -509,7 +509,8 @@
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
-$(objpfx)tst-_res1: $(objpfx)tst-_res1mod2.so $(shared-thread-library)
+$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
+ $(shared-thread-library)
else
$(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
$(objpfx)tst-cond19: $(common-objpfx)rt/librt.a
Modified: branches/eglibc-2_11/libc/posix/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/posix/Makefile (original)
+++ branches/eglibc-2_11/libc/posix/Makefile Mon Dec 6 12:55:10 2010
@@ -94,6 +94,7 @@
bug-regex14 bug-regex15 \
bug-regex21 bug-regex24 \
bug-regex27 bug-regex28 bug-regex29 bug-regex30 \
+ bug-regex31 \
tst-nice tst-nanosleep \
transbug \
tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
@@ -134,10 +135,12 @@
annexc annexc.out wordexp-tst.out bug-regex2-mem \
bug-regex2.mtrace bug-regex14-mem bug-regex14.mtrace \
bug-regex21-mem bug-regex21.mtrace \
+ bug-regex31-mem bug-regex31.mtrace \
tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
- tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
+ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist \
+ tst-fnmatch-mem tst-fnmatch.mtrace
include ../Rules
@@ -254,11 +257,11 @@
# Run a test on the header files we use.
# XXX Please note that for now we ignore the result of this test.
tests: $(objpfx)annexc.out
-# eglibc: ifeq (no,$(cross-compiling))
tests: $(objpfx)bug-regex2-mem \
$(objpfx)bug-regex21-mem \
+ $(objpfx)bug-regex31-mem \
$(objpfx)tst-getconf.out \
- $(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem
+ $(objpfx)bug-glob2-mem $(objpfx)tst-vfork3-mem $(objpfx)tst-fnmatch-mem
ifeq (y,($OPTION_POSIX_REGEXP_GLIBC))
tests: $(objpfx)bug-regex14-mem $(objpfx)tst-rxspencer-mem \
$(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem
@@ -274,6 +277,11 @@
$(objpfx)annexc: annexc.c
$(native-compile)
+tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace
+
+$(objpfx)tst-fnmatch-mem: $(objpfx)tst-fnmatch.out
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@
+
bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace
$(objpfx)bug-regex2-mem: $(objpfx)bug-regex2.out
@@ -288,6 +296,11 @@
$(objpfx)bug-regex21-mem: $(objpfx)bug-regex21.out
$(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@
+
+bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace
+
+$(objpfx)bug-regex31-mem: $(objpfx)bug-regex31.out
+ $(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@
tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace
Modified: branches/eglibc-2_11/libc/posix/fnmatch.c
==============================================================================
--- branches/eglibc-2_11/libc/posix/fnmatch.c (original)
+++ branches/eglibc-2_11/libc/posix/fnmatch.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007
+/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007,2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -43,6 +43,12 @@
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
+#endif
+
+#ifdef _LIBC
+# include <alloca.h>
+#else
+# define alloca_account(size., var) alloca (size)
#endif
/* For platform which support the ISO C amendement 1 functionality we
@@ -334,8 +340,11 @@
mbstate_t ps;
size_t n;
const char *p;
+ wchar_t *wpattern_malloc = NULL;
wchar_t *wpattern;
+ wchar_t *wstring_malloc = NULL;
wchar_t *wstring;
+ size_t alloca_used = 0;
/* Convert the strings into wide characters. */
memset (&ps, '\0', sizeof (ps));
@@ -347,7 +356,8 @@
#endif
if (__builtin_expect (n < 1024, 1))
{
- wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
+ wpattern = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
+ alloca_used);
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
/* Something wrong.
@@ -369,8 +379,11 @@
XXX Do we have to set `errno' to something which mbsrtows hasn't
already done? */
return -1;
- wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
+ wpattern_malloc = wpattern
+ = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
assert (mbsinit (&ps));
+ if (wpattern == NULL)
+ return -2;
(void) mbsrtowcs (wpattern, &pattern, n + 1, &ps);
}
@@ -383,13 +396,18 @@
p = string;
if (__builtin_expect (n < 1024, 1))
{
- wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
+ wstring = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
+ alloca_used);
n = mbsrtowcs (wstring, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ {
+ /* Something wrong.
+ XXX Do we have to set `errno' to something which
+ mbsrtows hasn't already done? */
+ free_return:
+ free (wpattern_malloc);
+ return -1;
+ }
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -404,19 +422,32 @@
/* Something wrong.
XXX Do we have to set `errno' to something which mbsrtows hasn't
already done? */
- return -1;
- wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
+ goto free_return;
+
+ wstring_malloc = wstring
+ = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
+ if (wstring == NULL)
+ {
+ free (wpattern_malloc);
+ return -2;
+ }
assert (mbsinit (&ps));
(void) mbsrtowcs (wstring, &string, n + 1, &ps);
}
- return internal_fnwmatch (wpattern, wstring, wstring + n,
- flags & FNM_PERIOD, flags, NULL);
+ int res = internal_fnwmatch (wpattern, wstring, wstring + n,
+ flags & FNM_PERIOD, flags, NULL,
+ alloca_used);
+
+ free (wstring_malloc);
+ free (wpattern_malloc);
+
+ return res;
}
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
return internal_fnmatch (pattern, string, string + strlen (string),
- flags & FNM_PERIOD, flags, NULL);
+ flags & FNM_PERIOD, flags, NULL, 0);
}
# ifdef _LIBC
Modified: branches/eglibc-2_11/libc/posix/fnmatch_loop.c
==============================================================================
--- branches/eglibc-2_11/libc/posix/fnmatch_loop.c (original)
+++ branches/eglibc-2_11/libc/posix/fnmatch_loop.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993,1996-2001,2003-2005,2007
+/* Copyright (C) 1991-1993,1996-2001,2003-2005,2007,2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -30,22 +30,24 @@
it matches, nonzero if not. */
static int FCT (const CHAR *pattern, const CHAR *string,
const CHAR *string_end, int no_leading_period, int flags,
- struct STRUCT *ends)
+ struct STRUCT *ends, size_t alloca_used)
internal_function;
static int EXT (INT opt, const CHAR *pattern, const CHAR *string,
- const CHAR *string_end, int no_leading_period, int flags)
+ const CHAR *string_end, int no_leading_period, int flags,
+ size_t alloca_used)
internal_function;
static const CHAR *END (const CHAR *patternp) internal_function;
static int
internal_function
-FCT (pattern, string, string_end, no_leading_period, flags, ends)
+FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
const CHAR *pattern;
const CHAR *string;
const CHAR *string_end;
int no_leading_period;
int flags;
struct STRUCT *ends;
+ size_t alloca_used;
{
register const CHAR *p = pattern, *n = string;
register UCHAR c;
@@ -74,10 +76,8 @@
case L('?'):
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
{
- int res;
-
- res = EXT (c, p, n, string_end, no_leading_period,
- flags);
+ int res = EXT (c, p, n, string_end, no_leading_period,
+ flags, alloca_used);
if (res != -1)
return res;
}
@@ -106,10 +106,8 @@
case L('*'):
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
{
- int res;
-
- res = EXT (c, p, n, string_end, no_leading_period,
- flags);
+ int res = EXT (c, p, n, string_end, no_leading_period,
+ flags, alloca_used);
if (res != -1)
return res;
}
@@ -198,7 +196,7 @@
for (--p; n < endp; ++n, no_leading_period = 0)
if (FCT (p, n, string_end, no_leading_period, flags2,
- &end) == 0)
+ &end, alloca_used) == 0)
goto found;
}
else if (c == L('/') && (flags & FNM_FILE_NAME))
@@ -207,7 +205,7 @@
++n;
if (n < string_end && *n == L('/')
&& (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags,
- NULL) == 0))
+ NULL, alloca_used) == 0))
return 0;
}
else
@@ -221,7 +219,7 @@
for (--p; n < endp; ++n, no_leading_period = 0)
if (FOLD ((UCHAR) *n) == c
&& (FCT (p, n, string_end, no_leading_period, flags2,
- &end) == 0))
+ &end, alloca_used) == 0))
{
found:
if (end.pattern == NULL)
@@ -758,7 +756,7 @@
_NL_COLLATE_SYMB_EXTRAMB);
/* Locate the character in the hashing
- table. */
+ table. */
hash = elem_hash (str, c1);
idx = 0;
@@ -980,9 +978,8 @@
case L('!'):
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
{
- int res;
-
- res = EXT (c, p, n, string_end, no_leading_period, flags);
+ int res = EXT (c, p, n, string_end, no_leading_period, flags,
+ alloca_used);
if (res != -1)
return res;
}
@@ -1061,26 +1058,32 @@
static int
internal_function
EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
- int no_leading_period, int flags)
+ int no_leading_period, int flags, size_t alloca_used)
{
const CHAR *startp;
int level;
struct patternlist
{
struct patternlist *next;
+ CHAR malloced;
CHAR str[0];
} *list = NULL;
struct patternlist **lastp = &list;
size_t pattern_len = STRLEN (pattern);
+ int any_malloced = 0;
const CHAR *p;
const CHAR *rs;
+ int retval = 0;
/* Parse the pattern. Store the individual parts in the list. */
level = 0;
for (startp = p = pattern + 1; level >= 0; ++p)
if (*p == L('\0'))
- /* This is an invalid pattern. */
- return -1;
+ {
+ /* This is an invalid pattern. */
+ retval = -1;
+ goto out;
+ }
else if (*p == L('['))
{
/* Handle brackets special. */
@@ -1097,8 +1100,11 @@
/* Skip over all characters of the list. */
while (*p != L(']'))
if (*p++ == L('\0'))
- /* This is no valid pattern. */
- return -1;
+ {
+ /* This is no valid pattern. */
+ retval = -1;
+ goto out;
+ }
}
else if ((*p == L('?') || *p == L('*') || *p == L('+') || *p == L('@')
|| *p == L('!')) && p[1] == L('('))
@@ -1111,15 +1117,25 @@
/* This means we found the end of the pattern. */
#define NEW_PATTERN \
struct patternlist *newp; \
- \
- if (opt == L('?') || opt == L('@')) \
- newp = alloca (sizeof (struct patternlist) \
- + (pattern_len * sizeof (CHAR))); \
+ size_t slen = (opt == L('?') || opt == L('@') \
+ ? pattern_len : (p - startp + 1)); \
+ slen = sizeof (struct patternlist) + (slen * sizeof (CHAR)); \
+ int malloced = ! __libc_use_alloca (alloca_used + slen); \
+ if (__builtin_expect (malloced, 0)) \
+ { \
+ newp = malloc (slen); \
+ if (newp == NULL) \
+ { \
+ retval = -2; \
+ goto out; \
+ } \
+ any_malloced = 1; \
+ } \
else \
- newp = alloca (sizeof (struct patternlist) \
- + ((p - startp + 1) * sizeof (CHAR))); \
+ newp = alloca_account (slen, alloca_used); \
+ newp->next = NULL; \
+ newp->malloced = malloced; \
*((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L('\0'); \
- newp->next = NULL; \
*lastp = newp; \
lastp = &newp->next
NEW_PATTERN;
@@ -1140,8 +1156,9 @@
switch (opt)
{
case L('*'):
- if (FCT (p, string, string_end, no_leading_period, flags, NULL) == 0)
- return 0;
+ if (FCT (p, string, string_end, no_leading_period, flags, NULL,
+ alloca_used) == 0)
+ goto success;
/* FALLTHROUGH */
case L('+'):
@@ -1152,7 +1169,7 @@
current pattern. */
if (FCT (list->str, string, rs, no_leading_period,
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
- NULL) == 0
+ NULL, alloca_used) == 0
/* This was successful. Now match the rest with the rest
of the pattern. */
&& (FCT (p, rs, string_end,
@@ -1160,7 +1177,7 @@
? no_leading_period
: rs[-1] == '/' && NO_LEADING_PERIOD (flags) ? 1 : 0,
flags & FNM_FILE_NAME
- ? flags : flags & ~FNM_PERIOD, NULL) == 0
+ ? flags : flags & ~FNM_PERIOD, NULL, alloca_used) == 0
/* This didn't work. Try the whole pattern. */
|| (rs != string
&& FCT (pattern - 1, rs, string_end,
@@ -1169,18 +1186,21 @@
: (rs[-1] == '/' && NO_LEADING_PERIOD (flags)
? 1 : 0),
flags & FNM_FILE_NAME
- ? flags : flags & ~FNM_PERIOD, NULL) == 0)))
+ ? flags : flags & ~FNM_PERIOD, NULL,
+ alloca_used) == 0)))
/* It worked. Signal success. */
- return 0;
+ goto success;
}
while ((list = list->next) != NULL);
/* None of the patterns lead to a match. */
- return FNM_NOMATCH;
+ retval = FNM_NOMATCH;
+ break;
case L('?'):
- if (FCT (p, string, string_end, no_leading_period, flags, NULL) == 0)
- return 0;
+ if (FCT (p, string, string_end, no_leading_period, flags, NULL,
+ alloca_used) == 0)
+ goto success;
/* FALLTHROUGH */
case L('@'):
@@ -1192,13 +1212,14 @@
if (FCT (STRCAT (list->str, p), string, string_end,
no_leading_period,
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
- NULL) == 0)
+ NULL, alloca_used) == 0)
/* It worked. Signal success. */
- return 0;
+ goto success;
while ((list = list->next) != NULL);
/* None of the patterns lead to a match. */
- return FNM_NOMATCH;
+ retval = FNM_NOMATCH;
+ break;
case L('!'):
for (rs = string; rs <= string_end; ++rs)
@@ -1208,7 +1229,7 @@
for (runp = list; runp != NULL; runp = runp->next)
if (FCT (runp->str, string, rs, no_leading_period,
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
- NULL) == 0)
+ NULL, alloca_used) == 0)
break;
/* If none of the patterns matched see whether the rest does. */
@@ -1218,21 +1239,34 @@
? no_leading_period
: rs[-1] == '/' && NO_LEADING_PERIOD (flags) ? 1 : 0,
flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
- NULL) == 0))
+ NULL, alloca_used) == 0))
/* This is successful. */
- return 0;
+ goto success;
}
/* None of the patterns together with the rest of the pattern
lead to a match. */
- return FNM_NOMATCH;
+ retval = FNM_NOMATCH;
+ break;
default:
assert (! "Invalid extended matching operator");
+ retval = -1;
break;
}
- return -1;
+ success:
+ out:
+ if (any_malloced)
+ while (list != NULL)
+ {
+ struct patternlist *old = list;
+ list = list->next;
+ if (old->malloced)
+ free (old);
+ }
+
+ return retval;
}
Modified: branches/eglibc-2_11/libc/posix/regcomp.c
==============================================================================
--- branches/eglibc-2_11/libc/posix/regcomp.c (original)
+++ branches/eglibc-2_11/libc/posix/regcomp.c Mon Dec 6 12:55:10 2010
@@ -2164,16 +2164,21 @@
exp = parse_expression (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && exp == NULL, 0))
{
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
return NULL;
}
if (tree != NULL && exp != NULL)
{
- tree = create_tree (dfa, tree, exp, CONCAT);
- if (tree == NULL)
+ bin_tree_t *newtree = create_tree (dfa, tree, exp, CONCAT);
+ if (newtree == NULL)
{
+ postorder (exp, free_tree, NULL);
+ postorder (tree, free_tree, NULL);
*err = REG_ESPACE;
return NULL;
}
+ tree = newtree;
}
else if (tree == NULL)
tree = exp;
@@ -2422,7 +2427,11 @@
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
- *err = REG_EPAREN;
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ *err = REG_EPAREN;
+ }
if (BE (*err != REG_NOERROR, 0))
return NULL;
}
@@ -3049,6 +3058,10 @@
if (BE (sbcset == NULL, 0))
#endif /* RE_ENABLE_I18N */
{
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ re_free (mbcset);
+#endif
*err = REG_ESPACE;
return NULL;
}
Modified: branches/eglibc-2_11/libc/posix/tst-fnmatch.c
==============================================================================
--- branches/eglibc-2_11/libc/posix/tst-fnmatch.c (original)
+++ branches/eglibc-2_11/libc/posix/tst-fnmatch.c Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Tests for fnmatch function.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2010 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
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <mcheck.h>
static char *next_input (char **line, int first, int last);
@@ -45,6 +46,8 @@
char *escpattern = NULL;
size_t escpatternlen = 0;
int nr = 0;
+
+ mtrace ();
/* Read lines from stdin with the following format:
Modified: branches/eglibc-2_11/libc/resolv/res_init.c
==============================================================================
--- branches/eglibc-2_11/libc/resolv/res_init.c (original)
+++ branches/eglibc-2_11/libc/resolv/res_init.c Mon Dec 6 12:55:10 2010
@@ -176,13 +176,6 @@
statp->id = res_randomid();
}
-#ifdef USELOOPBACK
- statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
-#else
- statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
-#endif
- statp->nsaddr.sin_family = AF_INET;
- statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
statp->nscount = 0;
statp->ndots = 1;
statp->pfcode = 0;
@@ -321,24 +314,24 @@
nserv++;
#ifdef _LIBC
nservall++;
- } else {
- struct in6_addr a6;
- char *el;
-
- if ((el = strchr(cp, '\n')) != NULL)
- *el = '\0';
+ } else {
+ struct in6_addr a6;
+ char *el;
+
+ if ((el = strchr(cp, '\n')) != NULL)
+ *el = '\0';
if ((el = strchr(cp, SCOPE_DELIMITER)) != NULL)
*el = '\0';
- if ((*cp != '\0') &&
- (inet_pton(AF_INET6, cp, &a6) > 0)) {
- struct sockaddr_in6 *sa6;
-
- sa6 = malloc(sizeof(*sa6));
- if (sa6 != NULL) {
- sa6->sin6_family = AF_INET6;
- sa6->sin6_port = htons(NAMESERVER_PORT);
+ if ((*cp != '\0') &&
+ (inet_pton(AF_INET6, cp, &a6) > 0)) {
+ struct sockaddr_in6 *sa6;
+
+ sa6 = malloc(sizeof(*sa6));
+ if (sa6 != NULL) {
+ sa6->sin6_family = AF_INET6;
+ sa6->sin6_port = htons(NAMESERVER_PORT);
sa6->sin6_flowinfo = 0;
- sa6->sin6_addr = a6;
+ sa6->sin6_addr = a6;
if (__builtin_expect (el == NULL, 1))
sa6->sin6_scope_id = 0;
@@ -365,9 +358,9 @@
statp->_u._ext.nsaddrs[nservall] = sa6;
statp->_u._ext.nssocks[nservall] = -1;
statp->_u._ext.nsmap[nservall] = MAXNS + 1;
- nservall++;
- }
- }
+ nservall++;
+ }
+ }
#endif
}
continue;
@@ -433,6 +426,12 @@
#endif
(void) fclose(fp);
}
+ if (__builtin_expect(statp->nscount == 0, 0)) {
+ statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
+ statp->nsaddr.sin_family = AF_INET;
+ statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
+ statp->nscount = 1;
+ }
if (statp->defdname[0] == 0 &&
__gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&
(cp = strchr(buf, '.')) != NULL)
@@ -538,12 +537,12 @@
} else if (!strncmp(cp, "no-check-names",
sizeof("no-check-names") - 1)) {
statp->options |= RES_NOCHECKNAME;
- } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
+ } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
statp->options |= RES_USE_EDNS0;
- } else if (!strncmp(cp, "single-request-reopen",
+ } else if (!strncmp(cp, "single-request-reopen",
sizeof("single-request-reopen") - 1)) {
statp->options |= RES_SNGLKUPREOP;
- } else if (!strncmp(cp, "single-request",
+ } else if (!strncmp(cp, "single-request",
sizeof("single-request") - 1)) {
statp->options |= RES_SNGLKUP;
} else {
Modified: branches/eglibc-2_11/libc/stdlib/strtod_l.c
==============================================================================
--- branches/eglibc-2_11/libc/stdlib/strtod_l.c (original)
+++ branches/eglibc-2_11/libc/stdlib/strtod_l.c Mon Dec 6 12:55:10 2010
@@ -1504,7 +1504,9 @@
register int i;
(void) __mpn_lshift (&retval[used
/ BITS_PER_MP_LIMB],
- retval, RETURN_LIMB_SIZE,
+ retval,
+ (RETURN_LIMB_SIZE
+ - used / BITS_PER_MP_LIMB),
used % BITS_PER_MP_LIMB);
for (i = used / BITS_PER_MP_LIMB - 1; i >= 0; --i)
retval[i] = 0;
Modified: branches/eglibc-2_11/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/generic/ldsodefs.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/generic/ldsodefs.h Mon Dec 6 12:55:10 2010
@@ -887,8 +887,11 @@
extern ElfW(Addr) _dl_symbol_value (struct link_map *map, const char *name)
internal_function;
-/* Allocate a `struct link_map' for a new object being loaded,
- and enter it into the _dl_main_map list. */
+/* Add the new link_map NEW to the end of the namespace list. */
+extern void _dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid)
+ internal_function attribute_hidden;
+
+/* Allocate a `struct link_map' for a new object being loaded. */
extern struct link_map *_dl_new_object (char *realname, const char *libname,
int type, struct link_map *loader,
int mode, Lmid_t nsid)
Modified: branches/eglibc-2_11/libc/sysdeps/i386/bits/byteswap.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/i386/bits/byteswap.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/i386/bits/byteswap.h Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -27,26 +27,27 @@
/* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+ ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
#ifdef __GNUC__
# if __GNUC__ >= 2
# define __bswap_16(x) \
(__extension__ \
- ({ register unsigned short int __v, __x = (x); \
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_16 (__x); \
else \
__asm__ ("rorw $8, %w0" \
: "=r" (__v) \
- : "0" (__x) \
- : "cc"); \
+ : "0" (__x) \
+ : "cc"); \
__v; }))
# else
/* This is better than nothing. */
# define __bswap_16(x) \
(__extension__ \
- ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); }))
+ ({ register unsigned short int __x = (unsigned short int) (x); \
+ __bswap_constant_16 (__x); }))
# endif
#else
static __inline unsigned short int
@@ -122,7 +123,7 @@
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
unsigned long int __l[2]; } __w, __r; \
- if (__builtin_constant_p (x)) \
+ if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
else \
{ \
Modified: branches/eglibc-2_11/libc/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c Mon Dec 6 12:55:10 2010
@@ -73,9 +73,9 @@
m = ((a.i[2] >> 20) & 0x7ff) - 54;
}
m += n;
- if (m > 0)
+ if ((int) m > 0)
a.i[2] = (a.i[2] & 0x800fffff) | (m << 20);
- else if (m <= -54) {
+ else if ((int) m <= -54) {
a.i[2] &= 0x80000000;
a.i[3] = 0;
} else {
Modified: branches/eglibc-2_11/libc/sysdeps/mach/hurd/linkat.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/mach/hurd/linkat.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/mach/hurd/linkat.c Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Make a link between file names relative to open directories. Hurd version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006,2010 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
@@ -38,7 +38,9 @@
file_t oldfile, linknode, todir;
char *toname;
- oldfile = __file_name_lookup_at (fromfd, flags, from, 0, 0);
+ /* POSIX says linkat doesn't follow symlinks by default, so pass
+ O_NOLINK. That can be overridden by AT_SYMLINK_FOLLOW in FLAGS. */
+ oldfile = __file_name_lookup_at (fromfd, flags, from, O_NOLINK, 0);
if (oldfile == MACH_PORT_NULL)
return -1;
Modified: branches/eglibc-2_11/libc/sysdeps/s390/s390-32/__longjmp.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/s390/s390-32/__longjmp.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/s390/s390-32/__longjmp.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
@@ -29,15 +29,18 @@
void
__longjmp (__jmp_buf env, int val)
{
- register int r2 __asm ("%r2") = val == 0 ? 1 : val;
#ifdef PTR_DEMANGLE
- register uintptr_t r3 __asm ("%r3") = THREAD_GET_POINTER_GUARD ();
- register void *r1 __asm ("%r1") = (void *) env;
+ uintptr_t guard = THREAD_GET_POINTER_GUARD ();
# ifdef CHECK_SP
- CHECK_SP (env, r3);
+ CHECK_SP (env, guard);
# endif
#elif defined CHECK_SP
CHECK_SP (env, 0);
+#endif
+ register int r2 __asm ("%r2") = val == 0 ? 1 : val;
+#ifdef PTR_DEMANGLE
+ register uintptr_t r3 __asm ("%r3") = guard;
+ register void *r1 __asm ("%r1") = (void *) env;
#endif
/* Restore registers and jump back. */
asm volatile ("ld %%f6,48(%1)\n\t"
Modified: branches/eglibc-2_11/libc/sysdeps/s390/s390-64/__longjmp.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/s390/s390-64/__longjmp.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/s390/s390-64/__longjmp.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
@@ -29,15 +29,18 @@
void
__longjmp (__jmp_buf env, int val)
{
- register long int r2 __asm ("%r2") = val == 0 ? 1 : val;
#ifdef PTR_DEMANGLE
- register uintptr_t r3 __asm ("%r3") = THREAD_GET_POINTER_GUARD ();
- register void *r1 __asm ("%r1") = (void *) env;
+ uintptr_t guard = THREAD_GET_POINTER_GUARD ();
# ifdef CHECK_SP
- CHECK_SP (env, r3);
+ CHECK_SP (env, guard);
# endif
#elif defined CHECK_SP
CHECK_SP (env, 0);
+#endif
+ register long int r2 __asm ("%r2") = val == 0 ? 1 : val;
+#ifdef PTR_DEMANGLE
+ register uintptr_t r3 __asm ("%r3") = guard;
+ register void *r1 __asm ("%r1") = (void *) env;
#endif
/* Restore registers and jump back. */
asm volatile ("ld %%f7,104(%1)\n\t"
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/check_pf.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/check_pf.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/check_pf.c Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Determine protocol families for which interfaces exist. Linux version.
- Copyright (C) 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007, 2008, 2010 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
@@ -304,10 +304,13 @@
struct ifaddrs *runp;
for (runp = ifa; runp != NULL; runp = runp->ifa_next)
- if (runp->ifa_addr->sa_family == PF_INET)
- *seen_ipv4 = true;
- else if (runp->ifa_addr->sa_family == PF_INET6)
- *seen_ipv6 = true;
+ if (runp->ifa_addr != NULL)
+ {
+ if (runp->ifa_addr->sa_family == PF_INET)
+ *seen_ipv4 = true;
+ else if (runp->ifa_addr->sa_family == PF_INET6)
+ *seen_ipv6 = true;
+ }
(void) freeifaddrs (ifa);
#endif
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getdents.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getdents.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getdents.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007
+/* Copyright (C) 1993, 1995-2004, 2006, 2007, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -285,7 +285,11 @@
DIRENT_SET_DP_INO(dp, kdp->d_ino);
dp->d_off = kdp->d_off;
dp->d_reclen = new_reclen;
+#ifdef __ASSUME_GETDENTS32_D_TYPE
+ dp->d_type = *((char *) kdp + kdp->d_reclen - 1);
+#else
dp->d_type = DT_UNKNOWN;
+#endif
memcpy (dp->d_name, kdp->d_name,
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/i386/bits/mman.h Mon Dec 6 12:55:10 2010
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/i386 version.
- Copyright (C) 1997,2000,2003,2005,2006,2009 Free Software Foundation, Inc.
+ Copyright (C) 1997,2000,2003,2005,2006,2009,2010
+ 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
@@ -64,6 +65,7 @@
# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
# define MAP_STACK 0x20000 /* Allocation is for a stack. */
+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
/* Flags to `msync'. */
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/internal_statvfs.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/internal_statvfs.c Mon Dec 6 12:55:10 2010
@@ -214,7 +214,8 @@
buf->f_files = fsbuf->f_files;
buf->f_ffree = fsbuf->f_ffree;
if (sizeof (buf->f_fsid) == sizeof (fsbuf->f_fsid))
- buf->f_fsid = (fsbuf->f_fsid.__val[0]
+ buf->f_fsid = ((fsbuf->f_fsid.__val[0]
+ & ((1UL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
| ((unsigned long int) fsbuf->f_fsid.__val[1]
<< (8 * (sizeof (buf->f_fsid)
- sizeof (fsbuf->f_fsid.__val[0])))));
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sparc/sys/epoll.h Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2006, 2007, 2008, 2010 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
@@ -31,7 +31,7 @@
#endif
-/* Flags to be passed to epoll_create2. */
+/* Flags to be passed to epoll_create1. */
enum
{
EPOLL_CLOEXEC = 0x400000,
@@ -101,8 +101,9 @@
returned by epoll_create() should be closed with close(). */
extern int epoll_create (int __size) __THROW;
-/* Same as epoll_create but with an additional FLAGS parameter. */
-extern int epoll_create2 (int __size, int __flags) __THROW;
+/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
+ parameter has been dropped. */
+extern int epoll_create1 (int __flags) __THROW;
/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sys/swap.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sys/swap.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/sys/swap.h Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Calls to enable and disable swapping on specified locations. Linux version.
- Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999, 2010 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
@@ -28,6 +28,7 @@
#define SWAP_FLAG_PREFER 0x8000 /* Set if swap priority is specified. */
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_PRIO_SHIFT 0
+#define SWAP_FLAG_DISCARD 0x10000 /* Discard swap cluster after use. */
__BEGIN_DECLS
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,93,1996-2002,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1996-2002,2006,2009,2010
+ 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
@@ -131,6 +132,9 @@
if (__builtin_expect (__tcgetattr (fd, &term) < 0, 0))
return NULL;
+ if (__fxstat64 (_STAT_VER, fd, &st) < 0)
+ return NULL;
+
/* We try using the /proc filesystem. */
*_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
@@ -161,13 +165,32 @@
{
if ((size_t) len >= buflen)
return NULL;
+
+#define UNREACHABLE_LEN strlen ("(unreachable)")
+ if (len > UNREACHABLE_LEN
+ && memcmp (ttyname_buf, "(unreachable)", UNREACHABLE_LEN) == 0)
+ {
+ memmove (ttyname_buf, ttyname_buf + UNREACHABLE_LEN,
+ len - UNREACHABLE_LEN);
+ len -= UNREACHABLE_LEN;
+ }
+
/* readlink need not terminate the string. */
ttyname_buf[len] = '\0';
- return ttyname_buf;
- }
-
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
- return NULL;
+
+ /* Verify readlink result, fall back on iterating through devices. */
+ if (ttyname_buf[0] == '/'
+ && __xstat64 (_STAT_VER, ttyname_buf, &st1) == 0
+#ifdef _STATBUF_ST_RDEV
+ && S_ISCHR (st1.st_mode)
+ && st1.st_rdev == st.st_rdev
+#else
+ && st1.st_ino == st.st_ino
+ && st1.st_dev == st.st_dev
+#endif
+ )
+ return ttyname_buf;
+ }
if (__xstat64 (_STAT_VER, "/dev/pts", &st1) == 0 && S_ISDIR (st1.st_mode))
{
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname_r.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname_r.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/ttyname_r.c Mon Dec 6 12:55:10 2010
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,93,1995-2001,2003,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1995-2001,2003,2006,2010
+ 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
@@ -122,6 +123,9 @@
if (__builtin_expect (__tcgetattr (fd, &term) < 0, 0))
return errno;
+ if (__fxstat64 (_STAT_VER, fd, &st) < 0)
+ return errno;
+
/* We try using the /proc filesystem. */
*_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
@@ -145,12 +149,30 @@
#endif
, 1))
{
+#define UNREACHABLE_LEN strlen ("(unreachable)")
+ if (ret > UNREACHABLE_LEN
+ && memcmp (buf, "(unreachable)", UNREACHABLE_LEN) == 0)
+ {
+ memmove (buf, buf + UNREACHABLE_LEN, ret - UNREACHABLE_LEN);
+ ret -= UNREACHABLE_LEN;
+ }
+
+ /* readlink need not terminate the string. */
buf[ret] = '\0';
- return 0;
- }
-
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
- return errno;
+
+ /* Verify readlink result, fall back on iterating through devices. */
+ if (buf[0] == '/'
+ && __xstat64 (_STAT_VER, buf, &st1) == 0
+#ifdef _STATBUF_ST_RDEV
+ && S_ISCHR (st1.st_mode)
+ && st1.st_rdev == st.st_rdev
+#else
+ && st1.st_ino == st.st_ino
+ && st1.st_dev == st.st_dev
+#endif
+ )
+ return 0;
+ }
/* Prepare the result buffer. */
memcpy (buf, "/dev/pts/", sizeof ("/dev/pts/"));
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,2009,2010 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
@@ -49,9 +49,9 @@
.text
ENTRY(____longjmp_chk)
/* Restore registers. */
- movq (JB_RSP*8)(%rdi),%r8
- movq (JB_RBP*8)(%rdi),%r9
- movq (JB_PC*8)(%rdi),%rdx
+ movq (JB_RSP*8)(%rdi), %r8
+ movq (JB_RBP*8)(%rdi), %r9
+ movq (JB_PC*8)(%rdi), %rdx
#ifdef PTR_DEMANGLE
PTR_DEMANGLE (%r8)
PTR_DEMANGLE (%r9)
@@ -63,7 +63,9 @@
/* Save function parameters. */
movq %rdi, %r10
- movl %esi, %ecx
+ cfi_register (%rdi, %r10)
+ movl %esi, %ebx
+ cfi_register (%rsi, %rbx)
xorl %edi, %edi
leaq -24(%rsp), %rsi
@@ -84,7 +86,9 @@
.Lfail: CALL_FAIL
.Lok2: movq %r10, %rdi
- movl %ecx, %esi
+ cfi_restore (%rdi)
+ movl %ebx, %esi
+ cfi_restore (%rsi)
.Lok: /* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
@@ -96,11 +100,11 @@
cfi_offset(%r13,JB_R13*8)
cfi_offset(%r14,JB_R14*8)
cfi_offset(%r15,JB_R15*8)
- movq (JB_RBX*8)(%rdi),%rbx
- movq (JB_R12*8)(%rdi),%r12
- movq (JB_R13*8)(%rdi),%r13
- movq (JB_R14*8)(%rdi),%r14
- movq (JB_R15*8)(%rdi),%r15
+ movq (JB_RBX*8)(%rdi), %rbx
+ movq (JB_R12*8)(%rdi), %r12
+ movq (JB_R13*8)(%rdi), %r13
+ movq (JB_R14*8)(%rdi), %r14
+ movq (JB_R15*8)(%rdi), %r15
/* Set return value for setjmp. */
movl %esi, %eax
movq %r8,%rsp
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/bits/mman.h Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/x86_64 version.
- Copyright (C) 2001, 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001,2003,2005,2006,2009,2010 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
@@ -65,6 +65,7 @@
# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
# define MAP_STACK 0x20000 /* Allocation is for a stack. */
+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
/* Flags to `msync'. */
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2008, 2010 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
@@ -31,7 +31,7 @@
#endif
-/* Flags to be passed to epoll_create2. */
+/* Flags to be passed to epoll_create1. */
enum
{
EPOLL_CLOEXEC = 02000000,
Modified: branches/eglibc-2_11/libc/sysdeps/x86_64/bits/byteswap.h
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/x86_64/bits/byteswap.h (original)
+++ branches/eglibc-2_11/libc/sysdeps/x86_64/bits/byteswap.h Mon Dec 6 12:55:10 2010
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -29,12 +29,12 @@
/* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+ ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
#if defined __GNUC__ && __GNUC__ >= 2
# define __bswap_16(x) \
(__extension__ \
- ({ register unsigned short int __v, __x = (x); \
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_16 (__x); \
else \
@@ -47,7 +47,8 @@
/* This is better than nothing. */
# define __bswap_16(x) \
(__extension__ \
- ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); }))
+ ({ register unsigned short int __x = (unsigned short int) (x); \
+ __bswap_constant_16 (__x); }))
#endif
@@ -120,16 +121,16 @@
# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
- unsigned int __l[2]; } __w, __r; \
- if (__builtin_constant_p (x)) \
- __r.__ll = __bswap_constant_64 (x); \
- else \
- { \
- __w.__ll = (x); \
- __r.__l[0] = __bswap_32 (__w.__l[1]); \
- __r.__l[1] = __bswap_32 (__w.__l[0]); \
- } \
- __r.__ll; }))
+ unsigned int __l[2]; } __w, __r; \
+ if (__builtin_constant_p (x)) \
+ __r.__ll = __bswap_constant_64 (x); \
+ else \
+ { \
+ __w.__ll = (x); \
+ __r.__l[0] = __bswap_32 (__w.__l[1]); \
+ __r.__l[1] = __bswap_32 (__w.__l[0]); \
+ } \
+ __r.__ll; }))
# endif
#endif
Modified: branches/eglibc-2_11/libc/sysdeps/x86_64/cacheinfo.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/x86_64/cacheinfo.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/x86_64/cacheinfo.c Mon Dec 6 12:55:10 2010
@@ -453,10 +453,10 @@
/* Half the data cache size for use in memory and string routines, typically
- L1 size. */
+ L1 size, rounded to multiple of 256 bytes. */
long int __x86_64_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
/* Shared cache size for use in memory and string routines, typically
- L2 or L3 size. */
+ L2 or L3 size, rounded to multiple of 256 bytes. */
long int __x86_64_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
long int __x86_64_shared_cache_size attribute_hidden = 1024 * 1024;
@@ -657,10 +657,16 @@
}
if (data > 0)
- __x86_64_data_cache_size_half = data / 2;
+ {
+ /* Round data cache size to multiple of 256 bytes. */
+ data = data & ~255L;
+ __x86_64_data_cache_size_half = data / 2;
+ }
if (shared > 0)
{
+ /* Round shared cache size to multiple of 256 bytes. */
+ shared = shared & ~255L;
__x86_64_shared_cache_size_half = shared / 2;
__x86_64_shared_cache_size = shared;
}
Modified: branches/eglibc-2_11/libc/version.h
==============================================================================
--- branches/eglibc-2_11/libc/version.h (original)
+++ branches/eglibc-2_11/libc/version.h Mon Dec 6 12:55:10 2010
@@ -1,4 +1,4 @@
/* This file just defines the current version number of libc. */
#define RELEASE "stable"
-#define VERSION "2.11.2"
+#define VERSION "2.11.3"