[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r21110 - in /branches/eglibc-2_16: ./ libc/ libc/malloc/ libc/posix/ libc/stdio-common/ libc/sysdeps/x86_64/multiarch/ ports...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r21110 - in /branches/eglibc-2_16: ./ libc/ libc/malloc/ libc/posix/ libc/stdio-common/ libc/sysdeps/x86_64/multiarch/ ports...
- From: joseph@xxxxxxxxxx
- Date: Wed, 10 Oct 2012 15:37:59 -0000
Author: joseph
Date: Wed Oct 10 15:37:59 2012
New Revision: 21110
Log:
Merge changes between r20864 and r21109 from /fsf/glibc-2_16-branch.
Modified:
branches/eglibc-2_16/ (props changed)
branches/eglibc-2_16/libc/ChangeLog
branches/eglibc-2_16/libc/NEWS
branches/eglibc-2_16/libc/malloc/arena.c
branches/eglibc-2_16/libc/posix/glob.c
branches/eglibc-2_16/libc/stdio-common/Makefile
branches/eglibc-2_16/libc/stdio-common/tst-sprintf.c
branches/eglibc-2_16/libc/stdio-common/vfprintf.c
branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.c
branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.h
branches/eglibc-2_16/ports/sysdeps/arm/bits/predefs.h (props changed)
Propchange: branches/eglibc-2_16/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 10 15:37:59 2012
@@ -1,2 +1,2 @@
-/fsf/glibc-2_16-branch:19382-20864
+/fsf/glibc-2_16-branch:19382-21109
/fsf/trunk:15224-19381
Modified: branches/eglibc-2_16/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_16/libc/ChangeLog (original)
+++ branches/eglibc-2_16/libc/ChangeLog Wed Oct 10 15:37:59 2012
@@ -1,3 +1,43 @@
+2012-10-04 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #14648]
+ * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
+ Set bit_FMA_Usable if FMA is supported.
+ * sysdeps/x86_64/multiarch/init-arch.h (bit_FMA_Usable): New
+ macro.
+ (bit_FMA4_Usable): Updated.
+ (index_FMA_Usable): New macro.
+ (CPUID_FMA): Likewise
+ (HAS_FMA): Defined with bit_FMA_Usable.
+
+2012-09-28 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ [BZ #6530]
+ * stdio-common/vfprintf.c (process_string_arg): Revert
+ 2000-07-22 change.
+
+2011-09-28 Jonathan Nieder <jrnieder@xxxxxxxxx>
+
+ * stdio-common/Makefile (tst-sprintf-ENV): Set environment
+ for testcase.
+ * stdio-common/tst-sprintf.c: Include <locale.h>
+ (main): Test sprintf's handling of incomplete multibyte
+ characters.
+
+2012-09-25 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #14621]
+ * posix/glob.c (next_brace_sub): Use size_t instead of unsigned
+ int as type of variable DEPTH.
+ (glob): Use size_t instead of int as type of variables NEWCOUNT
+ and OLD_PATHC.
+
+2012-09-24 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #14562]
+ * malloc/arena.c (heap_trim): Properly get fencepost and adjust
+ new chunk size with MALLOC_ALIGN_MASK.
+
2012-08-29 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #14476]
Modified: branches/eglibc-2_16/libc/NEWS
==============================================================================
--- branches/eglibc-2_16/libc/NEWS (original)
+++ branches/eglibc-2_16/libc/NEWS Wed Oct 10 15:37:59 2012
@@ -9,7 +9,7 @@
* The following bugs are resolved with this release:
- 14195, 14459, 14476
+ 6530, 14195, 14459, 14476, 14562, 14621, 14648
Version 2.16
Modified: branches/eglibc-2_16/libc/malloc/arena.c
==============================================================================
--- branches/eglibc-2_16/libc/malloc/arena.c (original)
+++ branches/eglibc-2_16/libc/malloc/arena.c Wed Oct 10 15:37:59 2012
@@ -652,15 +652,19 @@
unsigned long pagesz = GLRO(dl_pagesize);
mchunkptr top_chunk = top(ar_ptr), p, bck, fwd;
heap_info *prev_heap;
- long new_size, top_size, extra;
+ long new_size, top_size, extra, prev_size, misalign;
/* Can this heap go away completely? */
while(top_chunk == chunk_at_offset(heap, sizeof(*heap))) {
prev_heap = heap->prev;
- p = chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ));
+ prev_size = prev_heap->size - (MINSIZE-2*SIZE_SZ);
+ p = chunk_at_offset(prev_heap, prev_size);
+ /* fencepost must be properly aligned. */
+ misalign = ((long) p) & MALLOC_ALIGN_MASK;
+ p = chunk_at_offset(prev_heap, prev_size - misalign);
assert(p->size == (0|PREV_INUSE)); /* must be fencepost */
p = prev_chunk(p);
- new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ);
+ new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ) + misalign;
assert(new_size>0 && new_size<(long)(2*MINSIZE));
if(!prev_inuse(p))
new_size += p->prev_size;
Modified: branches/eglibc-2_16/libc/posix/glob.c
==============================================================================
--- branches/eglibc-2_16/libc/posix/glob.c (original)
+++ branches/eglibc-2_16/libc/posix/glob.c Wed Oct 10 15:37:59 2012
@@ -220,7 +220,7 @@
static const char *
next_brace_sub (const char *cp, int flags)
{
- unsigned int depth = 0;
+ size_t depth = 0;
while (*cp != '\0')
if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\')
{
@@ -965,7 +965,7 @@
&& S_ISDIR (st.st_mode))
: (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode)))))
{
- int newcount = pglob->gl_pathc + pglob->gl_offs;
+ size_t newcount = pglob->gl_pathc + pglob->gl_offs;
char **new_gl_pathv;
if (newcount > UINTPTR_MAX - (1 + 1)
@@ -1064,7 +1064,7 @@
appending the results to PGLOB. */
for (i = 0; i < dirs.gl_pathc; ++i)
{
- int old_pathc;
+ size_t old_pathc;
#ifdef SHELL
{
@@ -1119,7 +1119,7 @@
/* No matches. */
if (flags & GLOB_NOCHECK)
{
- int newcount = pglob->gl_pathc + pglob->gl_offs;
+ size_t newcount = pglob->gl_pathc + pglob->gl_offs;
char **new_gl_pathv;
if (newcount > UINTPTR_MAX - 2
@@ -1163,7 +1163,7 @@
}
else
{
- int old_pathc = pglob->gl_pathc;
+ size_t old_pathc = pglob->gl_pathc;
int orig_flags = flags;
if (meta & 2)
Modified: branches/eglibc-2_16/libc/stdio-common/Makefile
==============================================================================
--- branches/eglibc-2_16/libc/stdio-common/Makefile (original)
+++ branches/eglibc-2_16/libc/stdio-common/Makefile Wed Oct 10 15:37:59 2012
@@ -128,6 +128,7 @@
# We know the test has a format string problem.
CFLAGS-tst-sprintf.c = -Wno-format
+tst-sprintf-ENV = LOCPATH=$(common-objpfx)localedata
tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata
Modified: branches/eglibc-2_16/libc/stdio-common/tst-sprintf.c
==============================================================================
--- branches/eglibc-2_16/libc/stdio-common/tst-sprintf.c (original)
+++ branches/eglibc-2_16/libc/stdio-common/tst-sprintf.c Wed Oct 10 15:37:59 2012
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <locale.h>
#include <string.h>
#include <gnu/option-groups.h>
@@ -61,5 +62,17 @@
result = 1;
}
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("cannot set locale");
+ result = 1;
+ }
+ else if (sprintf (buf, "%.8s\n", "Foo: \277") != 7
+ || strcmp (buf, "Foo: \277\n") != 0)
+ {
+ printf ("sprintf (buf, \"%%.8s\\n\", \"Foo: \\277\") produced '%s' output\n", buf);
+ result = 1;
+ }
+
return result;
}
Modified: branches/eglibc-2_16/libc/stdio-common/vfprintf.c
==============================================================================
--- branches/eglibc-2_16/libc/stdio-common/vfprintf.c (original)
+++ branches/eglibc-2_16/libc/stdio-common/vfprintf.c Wed Oct 10 15:37:59 2012
@@ -1185,43 +1185,9 @@
else if (!is_long && spec != L_('S')) \
{ \
if (prec != -1) \
- { \
- /* Search for the end of the string, but don't search past \
- the length (in bytes) specified by the precision. Also \
- don't use incomplete characters. */ \
- if (! LOCALE_SUPPORT \
- ||_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
- len = __strnlen (string, prec); \
- else \
- { \
- /* In case we have a multibyte character set the \
- situation is more complicated. We must not copy \
- bytes at the end which form an incomplete character. */\
- size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
- wchar_t ignore[ignore_size]; \
- const char *str2 = string; \
- const char *strend = string + prec; \
- if (strend < string) \
- strend = (const char *) UINTPTR_MAX; \
- \
- mbstate_t ps; \
- memset (&ps, '\0', sizeof (ps)); \
- \
- while (str2 != NULL && str2 < strend) \
- if (__mbsnrtowcs (ignore, &str2, strend - str2, \
- ignore_size, &ps) == (size_t) -1) \
- { \
- /* Conversion function has set errno. */ \
- done = -1; \
- goto all_done; \
- } \
- \
- if (str2 == NULL) \
- len = strlen (string); \
- else \
- len = str2 - string - (ps.__count & 7); \
- } \
- } \
+ /* Search for the end of the string, but don't search past \
+ the length (in bytes) specified by the precision. */ \
+ len = __strnlen (string, prec); \
else \
len = strlen (string); \
} \
Modified: branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.c
==============================================================================
--- branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.c (original)
+++ branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.c Wed Oct 10 15:37:59 2012
@@ -156,6 +156,9 @@
/* Determine if AVX is usable. */
if (CPUID_AVX)
__cpu_features.feature[index_AVX_Usable] |= bit_AVX_Usable;
+ /* Determine if FMA is usable. */
+ if (CPUID_FMA)
+ __cpu_features.feature[index_FMA_Usable] |= bit_FMA_Usable;
/* Determine if FMA4 is usable. */
if (CPUID_FMA4)
__cpu_features.feature[index_FMA4_Usable] |= bit_FMA4_Usable;
Modified: branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.h
==============================================================================
--- branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.h (original)
+++ branches/eglibc-2_16/libc/sysdeps/x86_64/multiarch/init-arch.h Wed Oct 10 15:37:59 2012
@@ -22,7 +22,8 @@
#define bit_Fast_Unaligned_Load (1 << 4)
#define bit_Prefer_PMINUB_for_stringop (1 << 5)
#define bit_AVX_Usable (1 << 6)
-#define bit_FMA4_Usable (1 << 7)
+#define bit_FMA_Usable (1 << 7)
+#define bit_FMA4_Usable (1 << 8)
/* CPUID Feature flags. */
#define bit_SSE2 (1 << 26)
@@ -56,6 +57,7 @@
# define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
# define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE
# define index_AVX_Usable FEATURE_INDEX_1*FEATURE_SIZE
+# define index_FMA_Usable FEATURE_INDEX_1*FEATURE_SIZE
# define index_FMA4_Usable FEATURE_INDEX_1*FEATURE_SIZE
#else /* __ASSEMBLER__ */
@@ -131,6 +133,8 @@
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_OSXSAVE)
# define CPUID_AVX \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_AVX)
+# define CPUID_FMA \
+ HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
# define CPUID_FMA4 \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_80000001, ecx, bit_FMA4)
@@ -140,7 +144,6 @@
# define HAS_SSSE3 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSSE3)
# define HAS_SSE4_1 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_1)
# define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_2)
-# define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
# define index_Fast_Rep_String FEATURE_INDEX_1
# define index_Fast_Copy_Backward FEATURE_INDEX_1
@@ -148,6 +151,7 @@
# define index_Prefer_SSE_for_memop FEATURE_INDEX_1
# define index_Fast_Unaligned_Load FEATURE_INDEX_1
# define index_AVX_Usable FEATURE_INDEX_1
+# define index_FMA_Usable FEATURE_INDEX_1
# define index_FMA4_Usable FEATURE_INDEX_1
# define HAS_ARCH_FEATURE(name) \
@@ -159,6 +163,7 @@
# define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop)
# define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load)
# define HAS_AVX HAS_ARCH_FEATURE (AVX_Usable)
+# define HAS_FMA HAS_ARCH_FEATURE (FMA_Usable)
# define HAS_FMA4 HAS_ARCH_FEATURE (FMA4_Usable)
#endif /* __ASSEMBLER__ */
Propchange: branches/eglibc-2_16/ports/sysdeps/arm/bits/predefs.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 10 15:37:59 2012
@@ -1,3 +1,3 @@
-/fsf/glibc-2_16-branch/ports/sysdeps/arm/bits/predefs.h:19382-20864
+/fsf/glibc-2_16-branch/ports/sysdeps/arm/bits/predefs.h:19382-21109
/fsf/trunk/ports/sysdeps/arm/bits/predefs.h:18166-19381
/fsf/trunk/ports/sysdeps/arm/eabi/bits/predefs.h:15224-17813
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits