[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22633 - in /fsf/trunk/libc: ./ manual/ math/ ports/ ports/sysdeps/unix/sysv/linux/aarch64/ sysdeps/ieee754/dbl-64/ sysdeps/...



Author: eglibc
Date: Fri Mar 15 00:02:27 2013
New Revision: 22633

Log:
Import glibc-mainline for 2013-03-15

Added:
    fsf/trunk/libc/manual/nptl.texi
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/manual/Makefile
    fsf/trunk/libc/manual/debug.texi
    fsf/trunk/libc/math/libm-test.inc
    fsf/trunk/libc/ports/ChangeLog.aarch64
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j0.c
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j1.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/times.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 15 00:02:27 2013
@@ -1,3 +1,31 @@
+2013-03-14  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #14155]
+	* sysdeps/ieee754/dbl-64/e_j0.c (pzero): Return 1.0 for arguments
+	0x1p28 and above.
+	(qzero): Return -0.125 / x for arguments 0x1p28 and above.
+	* sysdeps/ieee754/dbl-64/e_j1.c (pzero): Return 1.0 for arguments
+	0x1p28 and above.
+	(qzero): Return 0.375 / x for arguments 0x1p28 and above.
+	* math/libm-test.inc (j0_test): Do not allow one spurious
+	underflow exception.
+	(y1_test): Likewise.
+
+2013-03-14  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* manual/Makefile (chapters): Add nptl.
+	* manual/debug.texi (Debugging Support): Add link to Threads
+	chapter.
+	* manual/nptl.texi: New file.
+
+	* sysdeps/unix/sysv/linux/times.c (__times): Fix formatting.
+
+2013-03-14  Petr Baudis  <pasky@xxxxxx>
+
+	* sysdeps/unix/sysv/linux/times.c (__times): On EFAULT, test
+	for non-NULL pointer before the memory validity test. Pointed
+	out by Holger Brunck <holger.brunck@xxxxxxxxxxx>.
+
 2013-03-13  Andreas Schwab  <schwab@xxxxxxx>
 
 	* extra-lib.mk (extra-objs): Add static-only-routines as .oS

Modified: fsf/trunk/libc/manual/Makefile
==============================================================================
--- fsf/trunk/libc/manual/Makefile (original)
+++ fsf/trunk/libc/manual/Makefile Fri Mar 15 00:02:27 2013
@@ -42,7 +42,7 @@
 		       message search pattern io stdio llio filesys	\
 		       pipe socket terminal syslog math arith time	\
 		       resource setjmp signal startup process job nss	\
-		       users sysinfo conf crypt debug)
+		       users sysinfo conf crypt debug nptl)
 add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi))
 appendices = lang.texi header.texi install.texi maint.texi platform.texi \
 	     contrib.texi

Modified: fsf/trunk/libc/manual/debug.texi
==============================================================================
--- fsf/trunk/libc/manual/debug.texi (original)
+++ fsf/trunk/libc/manual/debug.texi Fri Mar 15 00:02:27 2013
@@ -1,5 +1,5 @@
 @node Debugging Support
-@c @node Debugging Support, , Cryptographic Functions, Top
+@c @node Debugging Support, POSIX Threads, Cryptographic Functions, Top
 @c %MENU% Functions to help debugging applications
 @chapter Debugging support
 

Added: fsf/trunk/libc/manual/nptl.texi
==============================================================================
--- fsf/trunk/libc/manual/nptl.texi (added)
+++ fsf/trunk/libc/manual/nptl.texi Fri Mar 15 00:02:27 2013
@@ -1,0 +1,44 @@
+@node POSIX Threads
+@c @node POSIX Threads, , Cryptographic Functions, Top
+@chapter POSIX Threads
+@c %MENU% POSIX Threads
+@cindex threads
+
+This chapter describes the @glibcadj{} POSIX Thread implementation.
+
+@menu
+* Thread-specific Data::          Support for creating and
+				  managing thread-specific data
+@end menu
+
+@node Thread-specific Data
+@section Thread-specific Data
+
+The @glibcadj{} implements functions to allow users to create and manage
+data specific to a thread.  Such data may be destroyed at thread exit,
+if a destructor is provided.  The following functions are defined:
+
+@table @code
+
+@item int pthread_key_create (pthread_key_t *@var{key}, void (*@var{destructor})(void*))
+Create a thread-specific data key for the calling thread, referenced by
+@var{key}.
+
+Objects declared with the C++11 @code{thread_local} keyword are destroyed
+before thread-specific data, so they should not be used in thread-specific
+data destructors or even as members of the thread-specific data, since the
+latter is passed as an argument to the destructor function.
+
+@item int pthread_key_delete (pthread_key_t @var{key})
+Destroy the thread-specific data @var{key} in the calling thread.  The
+destructor for the thread-specific data is not called during destruction, nor
+is it called during thread exit.
+
+@item void *pthread_getspecific (pthread_key_t @var{key})
+Return the thread-specific data associated with @var{key} in the calling
+thread.
+
+@item int pthread_setspecific (pthread_key_t @var{key}, const void *@var{value})
+Associate the thread-specific @var{value} with @var{key} in the calling thread.
+
+@end table

Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Fri Mar 15 00:02:27 2013
@@ -6239,8 +6239,7 @@
   TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L);
   TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L);
 
-  /* Bug 14155: spurious exception may occur.  */
-  TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L, UNDERFLOW_EXCEPTION_OK);
+  TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L);
 
 #ifndef TEST_FLOAT
   /* Bug 14155: spurious exception may occur.  */
@@ -10494,8 +10493,7 @@
   TEST_f_f (y1, 8.0, -0.158060461731247494255555266187483550L);
   TEST_f_f (y1, 10.0, 0.249015424206953883923283474663222803L);
 
-  /* Bug 14155: spurious exception may occur.  */
-  TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L, UNDERFLOW_EXCEPTION_OK);
+  TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L);
 
 #ifndef TEST_FLOAT
   /* Bug 14155: spurious exception may occur.  */

Modified: fsf/trunk/libc/ports/ChangeLog.aarch64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.aarch64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.aarch64 Fri Mar 15 00:02:27 2013
@@ -1,3 +1,9 @@
+2013-03-14  Andreas Schwab  <schwab@xxxxxxx>
+
+	* sysdeps/unix/sysv/linux/aarch64/configure.in: Set
+	libc_cv_slibdir, libdir and libc_cv_localedir.
+	* sysdeps/unix/sysv/linux/aarch64/configure: Regenerate.
+
 2013-03-11  Andreas Schwab  <schwab@xxxxxxx>
 
 	[BZ #15234]

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure Fri Mar 15 00:02:27 2013
@@ -1,3 +1,16 @@
 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
 
 arch_minimum_kernel=3.7.0
+
+test -n "$libc_cv_slibdir" ||
+case "$prefix" in
+  /usr | /usr/)
+    libc_cv_slibdir="/lib64"
+    if test "$libdir" = '${exec_prefix}/lib'; then
+      libdir='${exec_prefix}/lib64';
+      # Locale data can be shared between 32bit and 64bit libraries
+      libc_cv_localedir='${exec_prefix}/lib/locale'
+    fi
+    ;;
+esac

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in Fri Mar 15 00:02:27 2013
@@ -2,3 +2,15 @@
 # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
 
 arch_minimum_kernel=3.7.0
+
+test -n "$libc_cv_slibdir" ||
+case "$prefix" in
+  /usr | /usr/)
+    libc_cv_slibdir="/lib64"
+    if test "$libdir" = '${exec_prefix}/lib'; then
+      libdir='${exec_prefix}/lib64';
+      # Locale data can be shared between 32bit and 64bit libraries
+      libc_cv_localedir='${exec_prefix}/lib/locale'
+    fi
+    ;;
+esac

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j0.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j0.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j0.c Fri Mar 15 00:02:27 2013
@@ -293,7 +293,8 @@
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = pR8; q= pS8;}
+	if (ix>=0x41b00000)    {return one;}
+	else if(ix>=0x40200000){p = pR8; q= pS8;}
 	else if(ix>=0x40122E8B){p = pR5; q= pS5;}
 	else if(ix>=0x4006DB6D){p = pR3; q= pS3;}
 	else if(ix>=0x40000000){p = pR2; q= pS2;}
@@ -400,7 +401,8 @@
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = qR8; q= qS8;}
+	if (ix>=0x41b00000)    {return -.125/x;}
+	else if(ix>=0x40200000){p = qR8; q= qS8;}
 	else if(ix>=0x40122E8B){p = qR5; q= qS5;}
 	else if(ix>=0x4006DB6D){p = qR3; q= qS3;}
 	else if(ix>=0x40000000){p = qR2; q= qS2;}

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j1.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j1.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_j1.c Fri Mar 15 00:02:27 2013
@@ -291,7 +291,8 @@
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = pr8; q= ps8;}
+	if (ix>=0x41b00000)    {return one;}
+	else if(ix>=0x40200000){p = pr8; q= ps8;}
 	else if(ix>=0x40122E8B){p = pr5; q= ps5;}
 	else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
 	else if(ix>=0x40000000){p = pr2; q= ps2;}
@@ -399,7 +400,8 @@
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = qr8; q= qs8;}
+	if (ix>=0x41b00000)    {return .375/x;}
+	else if(ix>=0x40200000){p = qr8; q= qs8;}
 	else if(ix>=0x40122E8B){p = qr5; q= qs5;}
 	else if(ix>=0x4006DB6D){p = qr3; q= qs3;}
 	else if(ix>=0x40000000){p = qr2; q= qs2;}

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/times.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/times.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/times.c Fri Mar 15 00:02:27 2013
@@ -26,13 +26,14 @@
   INTERNAL_SYSCALL_DECL (err);
   clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
   if (INTERNAL_SYSCALL_ERROR_P (ret, err)
-      && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0))
+      && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0)
+      && buf)
     {
       /* This might be an error or not.  For architectures which have
 	 no separate return value and error indicators we cannot
 	 distinguish a return value of -1 from an error.  Do it the
-	 hard way.  We crash applications which pass in an invalid BUF
-	 pointer.  */
+	 hard way.  We crash applications which pass in an invalid
+	 non-NULL BUF pointer.  Linux allows BUF to be NULL. */
 #define touch(v) \
       do {								      \
 	clock_t temp = v;						      \
@@ -44,7 +45,8 @@
       touch (buf->tms_cutime);
       touch (buf->tms_cstime);
 
-      /* If we come here the memory is valid and the kernel did not
+      /* If we come here the memory is valid (or BUF is NULL, which is
+         a valid condition for the kernel syscall) and the kernel did not
 	 return an EFAULT error.  Return the value given by the kernel.  */
     }
 

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits