[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r15225 - in /branches/eglibc-2_14: libc/ libc/elf/ libc/intl/ libc/locale/ libc/nptl/ libc/nptl/sysdeps/unix/sysv/linux/x86_...
- To: commits@xxxxxxxxxx
- Subject: [commits] r15225 - in /branches/eglibc-2_14: libc/ libc/elf/ libc/intl/ libc/locale/ libc/nptl/ libc/nptl/sysdeps/unix/sysv/linux/x86_...
- From: joseph@xxxxxxxxxx
- Date: Tue, 06 Sep 2011 15:10:33 -0000
Author: joseph
Date: Tue Sep 6 08:10:31 2011
New Revision: 15225
Log:
Merge changes between r14662 and r15224 from /fsf/glibc-2_14-branch.
Added:
branches/eglibc-2_14/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
- copied unchanged from r15224, fsf/glibc-2_14-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
branches/eglibc-2_14/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
- copied unchanged from r15224, fsf/glibc-2_14-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
Modified:
branches/eglibc-2_14/libc/ChangeLog
branches/eglibc-2_14/libc/elf/tst-audit4.c
branches/eglibc-2_14/libc/elf/tst-audit6.c
branches/eglibc-2_14/libc/intl/l10nflist.c
branches/eglibc-2_14/libc/locale/Makefile
branches/eglibc-2_14/libc/nptl/ChangeLog
branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
branches/eglibc-2_14/libc/nscd/nscd.c
branches/eglibc-2_14/libc/posix/getopt.c
branches/eglibc-2_14/libc/posix/glob.c
branches/eglibc-2_14/libc/resolv/res_init.c
branches/eglibc-2_14/libc/resolv/res_query.c
branches/eglibc-2_14/libc/stdlib/strtod_l.c
branches/eglibc-2_14/libc/stdlib/tst-strtod.c
branches/eglibc-2_14/libc/string/strxfrm_l.c
branches/eglibc-2_14/libc/sysdeps/i386/i486/bits/string.h
branches/eglibc-2_14/libc/sysdeps/posix/getaddrinfo.c
branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/pathconf.c
branches/eglibc-2_14/libc/sysdeps/x86_64/bits/link.h
branches/eglibc-2_14/libc/sysdeps/x86_64/dl-trampoline.S
branches/eglibc-2_14/ports/ChangeLog.mips
branches/eglibc-2_14/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
Modified: branches/eglibc-2_14/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_14/libc/ChangeLog (original)
+++ branches/eglibc-2_14/libc/ChangeLog Tue Sep 6 08:10:31 2011
@@ -1,3 +1,118 @@
+2011-08-14 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * locale/Makefile (locale-CPPFLAGS): Renamed CPPFLAGS-locale-programs.
+ (locale-CPPFLAGS): New variable; put LOCALEDIR, LOCALE_ALIAS_PATH and
+ -Iprograms here.
+ (cppflags-iterator.mk sequence): Use locale-programs in place of nonlib.
+ (localedef-modules): Add localedef.
+ (locale-modules): Add locale.
+
+2011-08-13 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * intl/l10nflist.c (_nl_normalize_codeset): Make it compile outside
+ of libc. Make tolower call locale-independent. Optimize a bit by
+ using isdigit instead of isalnum.
+ * locale/Makefile (locale-CPPFLAGS): Add -DNOT_IN_libc.
+
+2011-08-11 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * intl/l10nflist.c (_nl_make_l10nflist): Use locale-independent
+ classification.
+
+2011-07-22 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * resolv/res_init.c (__res_vinit): Properly tokenize nameserver
+ line.
+
+2011-07-26 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
+ encoding to ACE if AI_IDN.
+
+2011-07-25 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/i386/i486/bits/string.h (__strncat_g): Correctly handle
+ __n bigger than INT_MAX+1.
+ (__strncmp_g): Likewise.
+
+2011-07-23 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix one more
+ typo.
+ (_dl_x86_64_save_sse): Likewise.
+
+2011-07-22 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix test for
+ OSXSAVE.
+ (_dl_x86_64_save_sse): Likewise.
+
+2011-07-21 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix last
+ change.
+ (_dl_x86_64_save_sse): Use correct AVX check.
+
+2011-07-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #13007]
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): More complete
+ check for AVX enablement so that we don't crash with old kernels and
+ new hardware.
+ * elf/tst-audit4.c: Add same checks here.
+ * elf/tst-audit6.c: Likewise.
+
+2011-07-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12852]
+ * posix/glob.c (glob): Check passed in values before using them in
+ expressions to avoid some overflows.
+ (glob_in_dir): Likewise.
+
+2011-07-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/bits/link.h (La_x86_64_ymm): Force 16-byte alignment.
+
+2011-07-20 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * resolv/res_query.c (__libc_res_nquerydomain): Use size_t for
+ strlen results.
+
+2011-07-19 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * string/strxfrm_l.c (STRXFRM): Fix alloca accounting.
+
+2011-07-19 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * nscd/nscd.c (termination_handler): Don't do anything for a database
+ if it has not yet been initialized.
+
+2011-07-05 Andreas Jaeger <aj@xxxxxxx>
+
+ [BZ#9696]
+ * stdlib/tst-strtod.c: Add testcase.
+
+2011-07-07 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12868]
+ * sysdeps/unix/sysv/linux/linux_fsinfo.h: Define Lustre constants.
+ * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
+ Handle Lustre.
+ * sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Likewise.
+ (__statfs_filesize_max): Likewise.
+ Patch mostly by Andreas Dilger <adilger@xxxxxxxxxxxxx>.
+
+2011-07-06 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12922]
+ * posix/getopt.c (_getopt_internal_r): When "W;" is in short options
+ but no long options are defined, just return 'W'.
+
+2011-06-22 Marek Polacek <mpolacek@xxxxxxxxxx>
+
+ [BZ #9696]
+ * stdlib/strtod_l.c (round_and_return): Set ERANGE instead of EDOM.
+
2011-06-30 Andreas Schwab <schwab@xxxxxxxxxx>
* sysdeps/posix/getaddrinfo.c (gaih_inet): Make sure RES_USE_INET6
Modified: branches/eglibc-2_14/libc/elf/tst-audit4.c
==============================================================================
--- branches/eglibc-2_14/libc/elf/tst-audit4.c (original)
+++ branches/eglibc-2_14/libc/elf/tst-audit4.c Tue Sep 6 08:10:31 2011
@@ -6,16 +6,30 @@
#include <cpuid.h>
#include <immintrin.h>
+
+static int
+avx_enabled (void)
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0
+ || (ecx & (bit_AVX | bit_OSXSAVE)) != (bit_AVX | bit_OSXSAVE))
+ return 0;
+
+ /* Check the OS has AVX and SSE saving enabled. */
+ asm ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
+
+ return (eax & 6) == 6;
+}
+
+
extern __m256i audit_test (__m256i, __m256i, __m256i, __m256i,
__m256i, __m256i, __m256i, __m256i);
int
main (void)
{
- unsigned int eax, ebx, ecx, edx;
-
/* Run AVX test only if AVX is supported. */
- if (__get_cpuid (1, &eax, &ebx, &ecx, &edx)
- && (ecx & bit_AVX))
+ if (avx_enabled ())
{
__m256i ymm = _mm256_setzero_si256 ();
__m256i ret = audit_test (ymm, ymm, ymm, ymm, ymm, ymm, ymm, ymm);
Modified: branches/eglibc-2_14/libc/elf/tst-audit6.c
==============================================================================
--- branches/eglibc-2_14/libc/elf/tst-audit6.c (original)
+++ branches/eglibc-2_14/libc/elf/tst-audit6.c Tue Sep 6 08:10:31 2011
@@ -8,14 +8,28 @@
extern __m128i audit_test (__m128i, __m128i, __m128i, __m128i,
__m128i, __m128i, __m128i, __m128i);
+
+static int
+avx_enabled (void)
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0
+ || (ecx & (bit_AVX | bit_OSXSAVE)) != (bit_AVX | bit_OSXSAVE))
+ return 0;
+
+ /* Check the OS has AVX and SSE saving enabled. */
+ asm ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
+
+ return (eax & 6) == 6;
+}
+
+
int
main (void)
{
- unsigned int eax, ebx, ecx, edx;
-
/* Run AVX test only if AVX is supported. */
- if (__get_cpuid (1, &eax, &ebx, &ecx, &edx)
- && (ecx & bit_AVX))
+ if (avx_enabled ())
{
__m128i xmm = _mm_setzero_si128 ();
__m128i ret = audit_test (xmm, xmm, xmm, xmm, xmm, xmm, xmm, xmm);
Modified: branches/eglibc-2_14/libc/intl/l10nflist.c
==============================================================================
--- branches/eglibc-2_14/libc/intl/l10nflist.c (original)
+++ branches/eglibc-2_14/libc/intl/l10nflist.c Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2004, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxxxxxx>, 1995.
@@ -134,7 +134,7 @@
if (entry)
{
if (entry < argz + argz_len)
- entry = strchr (entry, '\0') + 1;
+ entry = strchr (entry, '\0') + 1;
return entry >= argz + argz_len ? NULL : (char *) entry;
}
@@ -332,13 +332,18 @@
char *retval;
char *wp;
size_t cnt;
+#ifdef NOT_IN_libc
+ locale_t locale = newlocale (0, "C", NULL);
+#else
+# define locale _nl_C_locobj_ptr
+#endif
for (cnt = 0; cnt < name_len; ++cnt)
- if (isalnum ((unsigned char) codeset[cnt]))
+ if (__isalnum_l ((unsigned char) codeset[cnt], locale))
{
++len;
- if (isalpha ((unsigned char) codeset[cnt]))
+ if (! __isdigit_l ((unsigned char) codeset[cnt], locale))
only_digit = 0;
}
@@ -346,15 +351,14 @@
if (retval != NULL)
{
+ wp = retval;
if (only_digit)
- wp = stpcpy (retval, "iso");
- else
- wp = retval;
+ wp = stpcpy (wp, "iso");
for (cnt = 0; cnt < name_len; ++cnt)
- if (isalpha ((unsigned char) codeset[cnt]))
- *wp++ = tolower ((unsigned char) codeset[cnt]);
- else if (isdigit ((unsigned char) codeset[cnt]))
+ if (__isalpha_l ((unsigned char) codeset[cnt], locale))
+ *wp++ = __tolower_l ((unsigned char) codeset[cnt], locale);
+ else if (__isdigit_l ((unsigned char) codeset[cnt], locale))
*wp++ = codeset[cnt];
*wp = '\0';
Modified: branches/eglibc-2_14/libc/locale/Makefile
==============================================================================
--- branches/eglibc-2_14/libc/locale/Makefile (original)
+++ branches/eglibc-2_14/libc/locale/Makefile Tue Sep 6 08:10:31 2011
@@ -1,4 +1,5 @@
-# Copyright (C) 1991,1992,1995-2003,2005,2009 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1995-2003,2005,2009,2011
+# 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,10 +76,11 @@
vpath %.h programs
vpath %.gperf programs
-localedef-modules := $(categories:%=ld-%) charmap linereader locfile \
+localedef-modules := localedef $(categories:%=ld-%) \
+ charmap linereader locfile \
repertoire locarchive
localedef-aux := md5
-locale-modules := locale-spec
+locale-modules := locale locale-spec
lib-modules := charmap-dir simple-hash xmalloc xstrdup
@@ -106,13 +108,18 @@
localepath = "$(localedir):$(i18ndir)"
-locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
- -DLOCALEDIR='"$(localedir)"' \
- -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
- -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
- -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
- -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
- -Iprograms
+# -Iprograms doesn't really belong here, but this gets it at the head
+# of the list instead of the tail, where CPPFLAGS-$(lib) gets added.
+# We need it before the standard -I's to see programs/config.h first.
+locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \
+ -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
+ -Iprograms
+
+CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \
+ -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
+ -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
+ -DLOCSRCDIR='"$(i18ndir)/locales"' \
+ -DHAVE_CONFIG_H -DNOT_IN_libc
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
@@ -121,10 +128,10 @@
CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
endif
-# This makes sure -DNOT_IN_libc is passed for all these modules.
+# This makes sure -DNOT_IN_libc et al are passed for all these modules.
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
$(locale-modules) $(lib-modules))
-lib := nonlib
+lib := locale-programs
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
Modified: branches/eglibc-2_14/libc/nptl/ChangeLog
==============================================================================
--- branches/eglibc-2_14/libc/nptl/ChangeLog (original)
+++ branches/eglibc-2_14/libc/nptl/ChangeLog Tue Sep 6 08:10:31 2011
@@ -1,3 +1,10 @@
+2011-08-08 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
+ stack.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+
2011-06-30 Ulrich Drepper <drepper@xxxxxxxxx>
* nptl-init.c (__nptl_set_robust): New function.
Modified: branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
==============================================================================
--- branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S (original)
+++ branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2009.
@@ -71,7 +71,9 @@
1: ret
-3: movq $TCB_PTHREAD_CANCELED, %fs:RESULT
+3: subq $8, %rsp
+ cfi_adjust_cfa_offset(8)
+ movq $TCB_PTHREAD_CANCELED, %fs:RESULT
lock
orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING
movq %fs:CLEANUP_JMP_BUF, %rdi
Modified: branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
==============================================================================
--- branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (original)
+++ branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -63,9 +63,9 @@
cfi_adjust_cfa_offset(8)
cfi_rel_offset(%r15, 0)
#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
-# define FRAME_SIZE 32
-#else
-# define FRAME_SIZE 48
+# define FRAME_SIZE (32+8)
+#else
+# define FRAME_SIZE (48+8)
#endif
subq $FRAME_SIZE, %rsp
cfi_adjust_cfa_offset(FRAME_SIZE)
Modified: branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
==============================================================================
--- branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (original)
+++ branches/eglibc-2_14/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -45,7 +45,7 @@
cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
#endif
-#define FRAME_SIZE 32
+#define FRAME_SIZE (32+8)
leaq -FRAME_SIZE(%rsp), %rsp
cfi_adjust_cfa_offset(FRAME_SIZE)
Modified: branches/eglibc-2_14/libc/nscd/nscd.c
==============================================================================
--- branches/eglibc-2_14/libc/nscd/nscd.c (original)
+++ branches/eglibc-2_14/libc/nscd/nscd.c Tue Sep 6 08:10:31 2011
@@ -480,7 +480,7 @@
/* Synchronize memory. */
for (int cnt = 0; cnt < lastdb; ++cnt)
{
- if (!dbs[cnt].enabled)
+ if (!dbs[cnt].enabled || dbs[cnt].head == NULL)
continue;
/* Make sure nobody keeps using the database. */
Modified: branches/eglibc-2_14/libc/posix/getopt.c
==============================================================================
--- branches/eglibc-2_14/libc/posix/getopt.c (original)
+++ branches/eglibc-2_14/libc/posix/getopt.c Tue Sep 6 08:10:31 2011
@@ -871,6 +871,9 @@
/* Convenience. Treat POSIX -W foo same as long option --foo */
if (temp[0] == 'W' && temp[1] == ';')
{
+ if (longopts == NULL)
+ goto no_longs;
+
char *nameend;
const struct option *p;
const struct option *pfound = NULL;
@@ -1086,8 +1089,10 @@
}
return pfound->val;
}
- d->__nextchar = NULL;
- return 'W'; /* Let the application handle it. */
+
+ no_longs:
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
Modified: branches/eglibc-2_14/libc/posix/glob.c
==============================================================================
--- branches/eglibc-2_14/libc/posix/glob.c (original)
+++ branches/eglibc-2_14/libc/posix/glob.c Tue Sep 6 08:10:31 2011
@@ -48,6 +48,12 @@
#endif
#include <pwd.h>
+
+#if defined HAVE_STDINT_H || defined _LIBC
+# include <stdint.h>
+#elif !defined UINTPTR_MAX
+# define UINTPTR_MAX (~((size_t) 0))
+#endif
#include <errno.h>
#ifndef __set_errno
@@ -439,6 +445,10 @@
else
{
size_t i;
+
+ if (pglob->gl_offs >= ~((size_t) 0) / sizeof (char *))
+ return GLOB_NOSPACE;
+
pglob->gl_pathv = (char **) malloc ((pglob->gl_offs + 1)
* sizeof (char *));
if (pglob->gl_pathv == NULL)
@@ -959,10 +969,8 @@
int newcount = pglob->gl_pathc + pglob->gl_offs;
char **new_gl_pathv;
- new_gl_pathv
- = (char **) realloc (pglob->gl_pathv,
- (newcount + 1 + 1) * sizeof (char *));
- if (new_gl_pathv == NULL)
+ if (newcount > UINTPTR_MAX - (1 + 1)
+ || newcount + 1 + 1 > ~((size_t) 0) / sizeof (char *))
{
nospace:
free (pglob->gl_pathv);
@@ -970,6 +978,12 @@
pglob->gl_pathc = 0;
return GLOB_NOSPACE;
}
+
+ new_gl_pathv
+ = (char **) realloc (pglob->gl_pathv,
+ (newcount + 1 + 1) * sizeof (char *));
+ if (new_gl_pathv == NULL)
+ goto nospace;
pglob->gl_pathv = new_gl_pathv;
if (flags & GLOB_MARK)
@@ -1109,14 +1123,19 @@
int newcount = pglob->gl_pathc + pglob->gl_offs;
char **new_gl_pathv;
+ if (newcount > UINTPTR_MAX - 2
+ || newcount + 2 > ~((size_t) 0) / sizeof (char *))
+ {
+ nospace2:
+ globfree (&dirs);
+ return GLOB_NOSPACE;
+ }
+
new_gl_pathv = (char **) realloc (pglob->gl_pathv,
(newcount + 2)
* sizeof (char *));
if (new_gl_pathv == NULL)
- {
- globfree (&dirs);
- return GLOB_NOSPACE;
- }
+ goto nospace2;
pglob->gl_pathv = new_gl_pathv;
pglob->gl_pathv[newcount] = __strdup (pattern);
@@ -1641,6 +1660,13 @@
{
result = 0;
+ if (pglob->gl_pathc > UINTPTR_MAX - pglob->gl_offs
+ || pglob->gl_pathc + pglob->gl_offs > UINTPTR_MAX - nfound
+ || pglob->gl_pathc + pglob->gl_offs + nfound > UINTPTR_MAX - 1
+ || (pglob->gl_pathc + pglob->gl_offs + nfound + 1
+ > UINTPTR_MAX / sizeof (char *)))
+ goto memory_error;
+
char **new_gl_pathv;
new_gl_pathv
= (char **) realloc (pglob->gl_pathv,
Modified: branches/eglibc-2_14/libc/resolv/res_init.c
==============================================================================
--- branches/eglibc-2_14/libc/resolv/res_init.c (original)
+++ branches/eglibc-2_14/libc/resolv/res_init.c Tue Sep 6 08:10:31 2011
@@ -318,7 +318,7 @@
struct in6_addr a6;
char *el;
- if ((el = strchr(cp, '\n')) != NULL)
+ if ((el = strpbrk(cp, " \t\n")) != NULL)
*el = '\0';
if ((el = strchr(cp, SCOPE_DELIMITER)) != NULL)
*el = '\0';
Modified: branches/eglibc-2_14/libc/resolv/res_query.c
==============================================================================
--- branches/eglibc-2_14/libc/resolv/res_query.c (original)
+++ branches/eglibc-2_14/libc/resolv/res_query.c Tue Sep 6 08:10:31 2011
@@ -543,7 +543,7 @@
{
char nbuf[MAXDNAME];
const char *longname = nbuf;
- int n, d;
+ size_t n, d;
#ifdef DEBUG
if (statp->options & RES_DEBUG)
Modified: branches/eglibc-2_14/libc/stdlib/strtod_l.c
==============================================================================
--- branches/eglibc-2_14/libc/stdlib/strtod_l.c (original)
+++ branches/eglibc-2_14/libc/stdlib/strtod_l.c Tue Sep 6 08:10:31 2011
@@ -1,5 +1,5 @@
/* Convert string representing a number to float value, using given locale.
- Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010
+ Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -186,7 +186,7 @@
if (shift > MANT_DIG)
{
- __set_errno (EDOM);
+ __set_errno (ERANGE);
return 0.0;
}
Modified: branches/eglibc-2_14/libc/stdlib/tst-strtod.c
==============================================================================
--- branches/eglibc-2_14/libc/stdlib/tst-strtod.c (original)
+++ branches/eglibc-2_14/libc/stdlib/tst-strtod.c Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1996-2001,2003,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996-2001,2003,2009,2011 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
@@ -73,6 +73,7 @@
{ "+InFiNiTy", HUGE_VAL, '\0', 0 },
#endif
{ "0x80000Ap-23", 0x80000Ap-23, '\0', 0 },
+ { "1e-324", 0, '\0', ERANGE },
{ NULL, 0, '\0', 0 }
};
Modified: branches/eglibc-2_14/libc/string/strxfrm_l.c
==============================================================================
--- branches/eglibc-2_14/libc/string/strxfrm_l.c (original)
+++ branches/eglibc-2_14/libc/string/strxfrm_l.c Tue Sep 6 08:10:31 2011
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995-1997,2002,2004-2006,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997,2002,2004-2006,2010,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@xxxxxxx>, 1995.
@@ -155,7 +156,7 @@
values. But since there is no limit on the length of the string
we have to use `malloc' if the string is too long. We should be
very conservative here. */
- if (! __libc_use_alloca (srclen))
+ if (! __libc_use_alloca ((srclen + 1) * (sizeof (int32_t) + 1)))
{
idxarr = (int32_t *) malloc ((srclen + 1) * (sizeof (int32_t) + 1));
rulearr = (unsigned char *) &idxarr[srclen];
Modified: branches/eglibc-2_14/libc/sysdeps/i386/i486/bits/string.h
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/i386/i486/bits/string.h (original)
+++ branches/eglibc-2_14/libc/sysdeps/i386/i486/bits/string.h Tue Sep 6 08:10:31 2011
@@ -1,6 +1,6 @@
/* Optimized, inlined string functions. i486 version.
- Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2004,2007
- Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2004,2007,2011
+ 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
@@ -1058,8 +1058,8 @@
"movl %4, %3\n\t"
"decl %1\n\t"
"1:\n\t"
- "decl %3\n\t"
- "js 2f\n\t"
+ "subl $1,%3\n\t"
+ "jc 2f\n\t"
"movb (%2),%b0\n\t"
"movsb\n\t"
"testb %b0,%b0\n\t"
@@ -1078,8 +1078,8 @@
"leal 1(%1),%1\n\t"
"jne 1b\n"
"2:\n\t"
- "decl %3\n\t"
- "js 3f\n\t"
+ "subl $1,%3\n\t"
+ "jc 3f\n\t"
"movb (%2),%b0\n\t"
"leal 1(%2),%2\n\t"
"movb %b0,(%1)\n\t"
@@ -1219,8 +1219,8 @@
register int __res;
__asm__ __volatile__
("1:\n\t"
- "decl %3\n\t"
- "js 2f\n\t"
+ "subl $1,%3\n\t"
+ "jc 2f\n\t"
"movb (%1),%b0\n\t"
"incl %1\n\t"
"cmpb %b0,(%2)\n\t"
Modified: branches/eglibc-2_14/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/posix/getaddrinfo.c (original)
+++ branches/eglibc-2_14/libc/sysdeps/posix/getaddrinfo.c Tue Sep 6 08:10:31 2011
@@ -432,7 +432,10 @@
/* In case the output string is the same as the input string
no new string has been allocated. */
if (p != name)
- malloc_name = true;
+ {
+ name = p;
+ malloc_name = true;
+ }
}
#endif
Modified: branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/internal_statvfs.c (original)
+++ branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/internal_statvfs.c Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2006, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2006, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -114,6 +114,9 @@
break;
case CGROUP_SUPER_MAGIC:
fsname = "cgroup";
+ break;
+ case LUSTRE_SUPER_MAGIC:
+ fsname = "lustre";
break;
}
Modified: branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h (original)
+++ branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h Tue Sep 6 08:10:31 2011
@@ -1,5 +1,5 @@
/* Constants from kernel header for various FSes.
- Copyright (C) 1998-2003,2005,2010 Free Software Foundation, Inc.
+ Copyright (C) 1998-2003,2005,2010,2011 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
@@ -83,6 +83,9 @@
/* Constant that identifies the `logfs' filesystem. */
#define LOGFS_MAGIC_U32 0xc97e8168u
+/* Constant that identifies the `lustre' filesystem. */
+#define LUSTRE_SUPER_MAGIC 0x0BD00BD0
+
/* Constants that identify the `minix2' filesystem. */
#define MINIX2_SUPER_MAGIC 0x2468
#define MINIX2_SUPER_MAGIC2 0x2478
@@ -150,6 +153,8 @@
/* Maximum link counts. */
#define COH_LINK_MAX 10000
#define EXT2_LINK_MAX 32000
+#define EXT4_LINK_MAX 65000
+#define LUSTRE_LINK_MAX EXT4_LINK_MAX
#define MINIX2_LINK_MAX 65530
#define MINIX_LINK_MAX 250
#define REISERFS_LINK_MAX 64535
Modified: branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/pathconf.c
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/pathconf.c (original)
+++ branches/eglibc-2_14/libc/sysdeps/unix/sysv/linux/pathconf.c Tue Sep 6 08:10:31 2011
@@ -121,6 +121,9 @@
case XFS_SUPER_MAGIC:
return XFS_LINK_MAX;
+ case LUSTRE_SUPER_MAGIC:
+ return LUSTRE_LINK_MAX;
+
default:
return LINUX_LINK_MAX;
}
@@ -157,6 +160,7 @@
case JFS_SUPER_MAGIC:
case VXFS_SUPER_MAGIC:
case CGROUP_SUPER_MAGIC:
+ case LUSTRE_SUPER_MAGIC:
return 64;
case MSDOS_SUPER_MAGIC:
Modified: branches/eglibc-2_14/libc/sysdeps/x86_64/bits/link.h
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/x86_64/bits/link.h (original)
+++ branches/eglibc-2_14/libc/sysdeps/x86_64/bits/link.h Tue Sep 6 08:10:31 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2009, 2011 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,7 +65,8 @@
/* Registers for entry into PLT on x86-64. */
# if __GNUC_PREREQ (4,0)
typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
-typedef float La_x86_64_ymm __attribute__ ((__vector_size__ (32)));
+typedef float La_x86_64_ymm
+ __attribute__ ((__vector_size__ (32), __aligned__ (16)));
# else
typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
# endif
@@ -76,7 +77,7 @@
La_x86_64_ymm ymm[2];
# endif
La_x86_64_xmm xmm[4];
-} La_x86_64_vector __attribute__ ((aligned(16)));
+} La_x86_64_vector __attribute__ ((__aligned__ (16)));
typedef struct La_x86_64_regs
{
Modified: branches/eglibc-2_14/libc/sysdeps/x86_64/dl-trampoline.S
==============================================================================
--- branches/eglibc-2_14/libc/sysdeps/x86_64/dl-trampoline.S (original)
+++ branches/eglibc-2_14/libc/sysdeps/x86_64/dl-trampoline.S Tue Sep 6 08:10:31 2011
@@ -1,5 +1,5 @@
/* PLT trampolines. x86-64 version.
- Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2009, 2011 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
@@ -139,11 +139,20 @@
movl $1, %eax
cpuid
movq %r11,%rbx # Restore rbx
- movl $1, %eax
- testl $(1 << 28), %ecx
+ xorl %eax, %eax
+ // AVX and XSAVE supported?
+ andl $((1 << 28) | (1 << 27)), %ecx
+ cmpl $((1 << 28) | (1 << 27)), %ecx
jne 2f
- negl %eax
-2: movl %eax, L(have_avx)(%rip)
+ xorl %ecx, %ecx
+ // Get XFEATURE_ENABLED_MASK
+ xgetbv
+ andl $0x6, %eax
+ cmpl $0x6, %eax
+ // Nonzero if SSE and AVX state saving is enabled.
+ sete %al
+2: leal -1(%eax,%eax), %eax
+ movl %eax, L(have_avx)(%rip)
cmpl $0, %eax
1: js L(no_avx)
@@ -176,11 +185,20 @@
movl $1, %eax
cpuid
movq %r11,%rbx # Restore rbx
- movl $1, %eax
- testl $(1 << 28), %ecx
+ xorl %eax, %eax
+ // AVX and XSAVE supported?
+ andl $((1 << 28) | (1 << 27)), %ecx
+ cmpl $((1 << 28) | (1 << 27)), %ecx
jne 2f
- negl %eax
-2: movl %eax, L(have_avx)(%rip)
+ xorl %ecx, %ecx
+ // Get XFEATURE_ENABLED_MASK
+ xgetbv
+ andl $0x6, %eax
+ cmpl $0x6, %eax
+ // Nonzero if SSE and AVX state saving is enabled.
+ sete %al
+2: leal -1(%eax,%eax), %eax
+ movl %eax, L(have_avx)(%rip)
cmpl $0, %eax
1: js L(no_avx5)
Modified: branches/eglibc-2_14/ports/ChangeLog.mips
==============================================================================
--- branches/eglibc-2_14/ports/ChangeLog.mips (original)
+++ branches/eglibc-2_14/ports/ChangeLog.mips Tue Sep 6 08:10:31 2011
@@ -1,3 +1,11 @@
+2011-09-06 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #13109]
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (fstatfs)
+ (statfs): New.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: New.
+
2011-06-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c,
Modified: branches/eglibc-2_14/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
==============================================================================
--- branches/eglibc-2_14/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (original)
+++ branches/eglibc-2_14/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list Tue Sep 6 08:10:31 2011
@@ -5,3 +5,6 @@
prlimit EXTRA prlimit64 i:iipp prlimit prlimit64
fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark
+
+fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
+statfs - statfs i:sp __statfs statfs statfs64 __statfs64