[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r14669 - in /fsf/glibc-2_14-branch/libc: ./ nscd/ posix/ resolv/ stdlib/ string/ sysdeps/unix/sysv/linux/ sysdeps/x86_64/bits/
- To: commits@xxxxxxxxxx
- Subject: [commits] r14669 - in /fsf/glibc-2_14-branch/libc: ./ nscd/ posix/ resolv/ stdlib/ string/ sysdeps/unix/sysv/linux/ sysdeps/x86_64/bits/
- From: eglibc@xxxxxxxxxx
- Date: Sat, 23 Jul 2011 07:08:07 -0000
Author: eglibc
Date: Sat Jul 23 00:08:04 2011
New Revision: 14669
Log:
Import glibc-2.14 for 2011-07-23
Modified:
fsf/glibc-2_14-branch/libc/ChangeLog
fsf/glibc-2_14-branch/libc/nscd/nscd.c
fsf/glibc-2_14-branch/libc/posix/getopt.c
fsf/glibc-2_14-branch/libc/posix/glob.c
fsf/glibc-2_14-branch/libc/resolv/res_query.c
fsf/glibc-2_14-branch/libc/stdlib/strtod_l.c
fsf/glibc-2_14-branch/libc/stdlib/tst-strtod.c
fsf/glibc-2_14-branch/libc/string/strxfrm_l.c
fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/pathconf.c
fsf/glibc-2_14-branch/libc/sysdeps/x86_64/bits/link.h
Modified: fsf/glibc-2_14-branch/libc/ChangeLog
==============================================================================
--- fsf/glibc-2_14-branch/libc/ChangeLog (original)
+++ fsf/glibc-2_14-branch/libc/ChangeLog Sat Jul 23 00:08:04 2011
@@ -1,3 +1,54 @@
+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: fsf/glibc-2_14-branch/libc/nscd/nscd.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/nscd/nscd.c (original)
+++ fsf/glibc-2_14-branch/libc/nscd/nscd.c Sat Jul 23 00:08:04 2011
@@ -477,7 +477,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: fsf/glibc-2_14-branch/libc/posix/getopt.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/posix/getopt.c (original)
+++ fsf/glibc-2_14-branch/libc/posix/getopt.c Sat Jul 23 00:08:04 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: fsf/glibc-2_14-branch/libc/posix/glob.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/posix/glob.c (original)
+++ fsf/glibc-2_14-branch/libc/posix/glob.c Sat Jul 23 00:08:04 2011
@@ -45,6 +45,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
@@ -436,6 +442,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)
@@ -954,10 +964,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);
@@ -965,6 +973,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)
@@ -1104,14 +1118,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);
@@ -1636,6 +1655,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: fsf/glibc-2_14-branch/libc/resolv/res_query.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/resolv/res_query.c (original)
+++ fsf/glibc-2_14-branch/libc/resolv/res_query.c Sat Jul 23 00:08:04 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: fsf/glibc-2_14-branch/libc/stdlib/strtod_l.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/stdlib/strtod_l.c (original)
+++ fsf/glibc-2_14-branch/libc/stdlib/strtod_l.c Sat Jul 23 00:08:04 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.
@@ -185,7 +185,7 @@
if (shift > MANT_DIG)
{
- __set_errno (EDOM);
+ __set_errno (ERANGE);
return 0.0;
}
Modified: fsf/glibc-2_14-branch/libc/stdlib/tst-strtod.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/stdlib/tst-strtod.c (original)
+++ fsf/glibc-2_14-branch/libc/stdlib/tst-strtod.c Sat Jul 23 00:08:04 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
@@ -72,6 +72,7 @@
{ "+InFiNiTy", HUGE_VAL, '\0', 0 },
#endif
{ "0x80000Ap-23", 0x80000Ap-23, '\0', 0 },
+ { "1e-324", 0, '\0', ERANGE },
{ NULL, 0, '\0', 0 }
};
Modified: fsf/glibc-2_14-branch/libc/string/strxfrm_l.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/string/strxfrm_l.c (original)
+++ fsf/glibc-2_14-branch/libc/string/strxfrm_l.c Sat Jul 23 00:08:04 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.
@@ -150,7 +151,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: fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/internal_statvfs.c (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/internal_statvfs.c Sat Jul 23 00:08:04 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: fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h Sat Jul 23 00:08:04 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: fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/pathconf.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/pathconf.c (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/unix/sysv/linux/pathconf.c Sat Jul 23 00:08:04 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: fsf/glibc-2_14-branch/libc/sysdeps/x86_64/bits/link.h
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/x86_64/bits/link.h (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/x86_64/bits/link.h Sat Jul 23 00:08:04 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
{