This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, release/2.14/master, updated. glibc-2.14-34-ge2a3090


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.14/master has been updated
       via  e2a309033d626c4b643afaf7e7ad2ccf4930dc35 (commit)
       via  c57be1aeee682c02664e5d92b8c597a376611bfe (commit)
       via  8cb4ac4610e7b7c17a0e7350f92ea0d4bc06b019 (commit)
       via  fcbeae78e427e902e85df3a0f5952b15d767035f (commit)
       via  d2f2a3fd9daaab2abf5835c005a6f88a8febfd36 (commit)
       via  d73a25eba31dbdddbb2f13ec2d1372599bdf6b3c (commit)
       via  722bff7a4ccceeded69ac8c412ff5ee5859964e7 (commit)
      from  63072fc6170f06657800a536c084db5d6e45e80f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e2a309033d626c4b643afaf7e7ad2ccf4930dc35

commit e2a309033d626c4b643afaf7e7ad2ccf4930dc35
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Aug 4 15:50:48 2011 -0400

    Properly tokenize nameserver line for servers with IPv6 address
    (cherry picked from commit 9be9bfcc9de543ac0ac335692cbbf8a0f46a2ccc)

diff --git a/ChangeLog b/ChangeLog
index cdaab23..0be6e1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-22  Andreas Schwab  <schwab@redhat.com>
+
+	* resolv/res_init.c (__res_vinit): Properly tokenize nameserver
+	line.
+
 2011-07-26  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 64934b0..73caaa4 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -318,7 +318,7 @@ __res_vinit(res_state statp, int preinit) {
 			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';

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c57be1aeee682c02664e5d92b8c597a376611bfe

commit c57be1aeee682c02664e5d92b8c597a376611bfe
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Aug 4 15:42:10 2011 -0400

    Fix encoding name for IDN in getaddrinfo
    (cherry picked from commit 2e96f1c73b06e81da59ef7fffa426dc201875f31)

diff --git a/ChangeLog b/ChangeLog
index 2f63794..cdaab23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-26  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
+	encoding to ACE if AI_IDN.
+
 2011-07-25  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/i386/i486/bits/string.h (__strncat_g): Correctly handle
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 27ce75e..13dbe10 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -432,7 +432,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	  /* 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
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cb4ac4610e7b7c17a0e7350f92ea0d4bc06b019

commit 8cb4ac4610e7b7c17a0e7350f92ea0d4bc06b019
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Aug 4 14:59:25 2011 -0400

    Fix inline strncat/strncmp on x86
    (cherry picked from commit 8c1a459f9a64abee69c154c8a0e5ab9be86256e4)

diff --git a/ChangeLog b/ChangeLog
index 1c034b6..2f63794 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-25  Andreas Schwab  <schwab@redhat.com>
+
+	* 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@gmail.com>
 
 	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix one more
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 9f05c7e..4f8c104 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -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 @@ __strncat_g (char *__dest, __const char __src[], size_t __n)
      "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 @@ __strncat_g (char *__dest, __const char __src[], size_t __n)
      "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 @@ __strncmp_g (__const char *__s1, __const char *__s2, size_t __n)
   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"

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fcbeae78e427e902e85df3a0f5952b15d767035f

commit fcbeae78e427e902e85df3a0f5952b15d767035f
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Jul 23 15:18:13 2011 -0400

    One more typo in AVX test
    (cherry picked from commit bba33c289b1b24e1bb3075b7fce5b56c9d01ce2f)

diff --git a/ChangeLog b/ChangeLog
index d654f21..1c034b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-23  Ulrich Drepper  <drepper@gmail.com>
+
+	* 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@gmail.com>
 
 	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix test for
diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S
index 4aa63ee..45a2dc2 100644
--- a/sysdeps/x86_64/dl-trampoline.S
+++ b/sysdeps/x86_64/dl-trampoline.S
@@ -143,7 +143,7 @@ L(have_avx):
 	// AVX and XSAVE supported?
 	andl	$((1 << 28) | (1 << 27)), %ecx
 	cmpl	$((1 << 28) | (1 << 27)), %ecx
-	je	2f
+	jne	2f
 	xorl	%ecx, %ecx
 	// Get XFEATURE_ENABLED_MASK
 	xgetbv
@@ -189,7 +189,7 @@ _dl_x86_64_save_sse:
 	// AVX and XSAVE supported?
 	andl	$((1 << 28) | (1 << 27)), %ecx
 	cmpl	$((1 << 28) | (1 << 27)), %ecx
-	je	2f
+	jne	2f
 	xorl	%ecx, %ecx
 	// Get XFEATURE_ENABLED_MASK
 	xgetbv

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2f2a3fd9daaab2abf5835c005a6f88a8febfd36

commit d2f2a3fd9daaab2abf5835c005a6f88a8febfd36
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Jul 22 23:33:22 2011 -0400

    One more change to XSAVE patch
    (cherry picked from commit 1aae088a8aa2a4e4211bfe6c0e18100d85f106ae)

diff --git a/ChangeLog b/ChangeLog
index 6f698c6..d654f21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-22  Ulrich Drepper  <drepper@gmail.com>
+
+	* 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@redhat.com>
 
 	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix last
diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S
index ad7479f..4aa63ee 100644
--- a/sysdeps/x86_64/dl-trampoline.S
+++ b/sysdeps/x86_64/dl-trampoline.S
@@ -141,7 +141,8 @@ L(have_avx):
 	movq	%r11,%rbx		# Restore rbx
 	xorl	%eax, %eax
 	// AVX and XSAVE supported?
-	testl	$((1 << 28) | (1 << 27)), %ecx
+	andl	$((1 << 28) | (1 << 27)), %ecx
+	cmpl	$((1 << 28) | (1 << 27)), %ecx
 	je	2f
 	xorl	%ecx, %ecx
 	// Get XFEATURE_ENABLED_MASK
@@ -186,7 +187,8 @@ _dl_x86_64_save_sse:
 	movq	%r11,%rbx		# Restore rbx
 	xorl	%eax, %eax
 	// AVX and XSAVE supported?
-	testl	$((1 << 28) | (1 << 27)), %ecx
+	andl	$((1 << 28) | (1 << 27)), %ecx
+	cmpl	$((1 << 28) | (1 << 27)), %ecx
 	je	2f
 	xorl	%ecx, %ecx
 	// Get XFEATURE_ENABLED_MASK

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d73a25eba31dbdddbb2f13ec2d1372599bdf6b3c

commit d73a25eba31dbdddbb2f13ec2d1372599bdf6b3c
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Jul 22 14:33:47 2011 -0400

    Fix AVX check
    (cherry picked from commit 1d002f25399c0a0ed2cc276d4ee18db869152384)

diff --git a/ChangeLog b/ChangeLog
index 9b130a5..6f698c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-21  Andreas Schwab  <schwab@redhat.com>
+
+	* 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@gmail.com>
 
 	[BZ #13007]
diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S
index 1b97929..ad7479f 100644
--- a/sysdeps/x86_64/dl-trampoline.S
+++ b/sysdeps/x86_64/dl-trampoline.S
@@ -150,7 +150,8 @@ L(have_avx):
 	cmpl	$0x6, %eax
 	// Nonzero if SSE and AVX state saving is enabled.
 	sete	%al
-2:	movl	%eax, L(have_avx)(%rip)
+2:	leal	-1(%eax,%eax), %eax
+	movl	%eax, L(have_avx)(%rip)
 	cmpl	$0, %eax
 
 1:	js	L(no_avx)
@@ -183,11 +184,19 @@ _dl_x86_64_save_sse:
 	movl	$1, %eax
 	cpuid
 	movq	%r11,%rbx		# Restore rbx
-	movl	$1, %eax
-	testl	$(1 << 28), %ecx
-	jne	2f
-	negl	%eax
-2:	movl	%eax, L(have_avx)(%rip)
+	xorl	%eax, %eax
+	// AVX and XSAVE supported?
+	testl	$((1 << 28) | (1 << 27)), %ecx
+	je	2f
+	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)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=722bff7a4ccceeded69ac8c412ff5ee5859964e7

commit 722bff7a4ccceeded69ac8c412ff5ee5859964e7
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Jul 20 21:21:03 2011 -0400

    Fix check for AVX enablement
    
    The AVX bit is set if the CPU supports AVX.  But this doesn't mean the
    kernel does.  Add checks according to Intel's documentation.
    (cherry picked from commit 5644ef5461b5d3ff266206d8ee70d4b575ea6658)

diff --git a/ChangeLog b/ChangeLog
index 515f22c..9b130a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-07-20  Ulrich Drepper  <drepper@gmail.com>
 
+	[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@gmail.com>
+
 	[BZ #12852]
 	* posix/glob.c (glob): Check passed in values before using them in
 	expressions to avoid some overflows.
diff --git a/elf/tst-audit4.c b/elf/tst-audit4.c
index b17d4a6..c4f1d5b 100644
--- a/elf/tst-audit4.c
+++ b/elf/tst-audit4.c
@@ -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);
diff --git a/elf/tst-audit6.c b/elf/tst-audit6.c
index 1f6dcb1..64209a1 100644
--- a/elf/tst-audit6.c
+++ b/elf/tst-audit6.c
@@ -8,14 +8,28 @@
 extern __m128i audit_test (__m128i, __m128i, __m128i, __m128i,
 			   __m128i, __m128i, __m128i, __m128i);
 
-int
-main (void)
+
+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)
+{
   /* 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);
diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S
index 5564a11..1b97929 100644
--- a/sysdeps/x86_64/dl-trampoline.S
+++ b/sysdeps/x86_64/dl-trampoline.S
@@ -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,10 +139,17 @@ L(have_avx):
 	movl	$1, %eax
 	cpuid
 	movq	%r11,%rbx		# Restore rbx
-	movl	$1, %eax
-	testl	$(1 << 28), %ecx
-	jne	2f
-	negl	%eax
+	xorl	%eax, %eax
+	// AVX and XSAVE supported?
+	testl	$((1 << 28) | (1 << 27)), %ecx
+	je	2f
+	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:	movl	%eax, L(have_avx)(%rip)
 	cmpl	$0, %eax
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                       |   43 +++++++++++++++++++++++++++++++++++++++
 elf/tst-audit4.c                |   22 ++++++++++++++++---
 elf/tst-audit6.c                |   22 ++++++++++++++++---
 resolv/res_init.c               |    2 +-
 sysdeps/i386/i486/bits/string.h |   16 +++++++-------
 sysdeps/posix/getaddrinfo.c     |    5 +++-
 sysdeps/x86_64/dl-trampoline.S  |   36 ++++++++++++++++++++++++--------
 7 files changed, 119 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]