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

[Commits] r25157 - in /fsf/trunk/libc: ./ manual/ ports/ ports/sysdeps/aarch64/ ports/sysdeps/unix/sysv/linux/ia64/ sysdeps/x86/fpu/bits/



Author: eglibc
Date: Thu Jan 30 00:01:58 2014
New Revision: 25157

Log:
Import glibc-mainline for 2014-01-30

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/manual/charset.texi
    fsf/trunk/libc/ports/ChangeLog.aarch64
    fsf/trunk/libc/ports/ChangeLog.ia64
    fsf/trunk/libc/ports/sysdeps/aarch64/libm-test-ulps
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S
    fsf/trunk/libc/sysdeps/x86/fpu/bits/mathinline.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jan 30 00:01:58 2014
@@ -1,3 +1,13 @@
+2014-01-29  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #16510]
+	* sysdeps/x86/fpu/bits/mathinline.h: Check __SSE2_MATH__ instead
+	of __x86_64__ when disabling x87 inline functions.
+
+2014-01-29  Alexandre Oliva <aoliva@xxxxxxxxxx>
+
+	* manual/charset.texi: Document MTASC-safety properties.
+
 2014-01-29  Alexandre Oliva <aoliva@xxxxxxxxxx>
 
 	* manual/crypt.texi: Document MTASC-safety properties.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu Jan 30 00:01:58 2014
@@ -25,7 +25,8 @@
   16151, 16153, 16167, 16169, 16172, 16195, 16214, 16245, 16271, 16274,
   16283, 16289, 16293, 16314, 16316, 16330, 16337, 16338, 16356, 16365,
   16366, 16369, 16372, 16375, 16379, 16384, 16385, 16386, 16387, 16390,
-  16394, 16400, 16407, 16408, 16414, 16430, 16431, 16453, 16474, 16506.
+  16394, 16400, 16407, 16408, 16414, 16430, 16431, 16453, 16474, 16506,
+  16510
 
 * Slovenian translations for glibc messages have been contributed by the
   Translation Project's Slovenian team of translators.

Modified: fsf/trunk/libc/manual/charset.texi
==============================================================================
--- fsf/trunk/libc/manual/charset.texi (original)
+++ fsf/trunk/libc/manual/charset.texi Thu Jan 30 00:01:58 2014
@@ -504,6 +504,14 @@
 @comment wchar.h
 @comment ISO
 @deftypefun int mbsinit (const mbstate_t *@var{ps})
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+@c ps is dereferenced once, unguarded.  This would call for @mtsrace:ps,
+@c but since a single word-sized field is (atomically) accessed, any
+@c race here would be harmless.  Other functions that take an optional
+@c mbstate_t* argument named ps are marked with @mtasurace:<func>/!ps,
+@c to indicate that the function uses a static buffer if ps is NULL.
+@c These could also have been marked with @mtsrace:ps, but we'll omit
+@c that for brevity, for it's somewhat redundant with the @mtasurace.
 The @code{mbsinit} function determines whether the state object pointed
 to by @var{ps} is in the initial state.  If @var{ps} is a null pointer or
 the object is in the initial state the return value is nonzero.  Otherwise
@@ -559,6 +567,14 @@
 @comment wchar.h
 @comment ISO
 @deftypefun wint_t btowc (int @var{c})
+@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
+@c Calls btowc_fct or __fct; reads from locale, and from the
+@c get_gconv_fcts result multiple times.  get_gconv_fcts calls
+@c __wcsmbs_load_conv to initialize the ctype if it's null.
+@c wcsmbs_load_conv takes a non-recursive wrlock before allocating
+@c memory for the fcts structure, initializing it, and then storing it
+@c in the locale object.  The initialization involves dlopening and a
+@c lot more.
 The @code{btowc} function (``byte to wide character'') converts a valid
 single byte character @var{c} in the initial shift state into the wide
 character equivalent using the conversion rules from the currently
@@ -615,6 +631,7 @@
 @comment wchar.h
 @comment ISO
 @deftypefun int wctob (wint_t @var{c})
+@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{wctob} function (``wide character to byte'') takes as the
 parameter a valid wide character.  If the multibyte representation for
 this character in the initial state is exactly one byte long, the return
@@ -634,6 +651,7 @@
 @comment wchar.h
 @comment ISO
 @deftypefun size_t mbrtowc (wchar_t *restrict @var{pwc}, const char *restrict @var{s}, size_t @var{n}, mbstate_t *restrict @var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:mbrtowc/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 @cindex stateful
 The @code{mbrtowc} function (``multibyte restartable to wide
 character'') converts the next multibyte character in the string pointed
@@ -728,6 +746,7 @@
 @comment wchar.h
 @comment ISO
 @deftypefun size_t mbrlen (const char *restrict @var{s}, size_t @var{n}, mbstate_t *@var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:mbrlen/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{mbrlen} function (``multibyte restartable length'') computes
 the number of at most @var{n} bytes starting at @var{s}, which form the
 next valid and complete multibyte character.
@@ -811,6 +830,50 @@
 @comment wchar.h
 @comment ISO
 @deftypefun size_t wcrtomb (char *restrict @var{s}, wchar_t @var{wc}, mbstate_t *restrict @var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:wcrtomb/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
+@c wcrtomb uses a static, non-thread-local unguarded state variable when
+@c PS is NULL.  When a state is passed in, and it's not used
+@c concurrently in other threads, this function behaves safely as long
+@c as gconv modules don't bring MT safety issues of their own.
+@c Attempting to load gconv modules or to build conversion chains in
+@c signal handlers may encounter gconv databases or caches in a
+@c partially-updated state, and asynchronous cancellation may leave them
+@c in such states, besides leaking the lock that guards them.
+@c get_gconv_fcts ok
+@c    wcsmbs_load_conv ok
+@c      norm_add_slashes ok
+@c      wcsmbs_getfct ok
+@c        gconv_find_transform ok
+@c          gconv_read_conf (libc_once)
+@c          gconv_lookup_cache ok
+@c            find_module_idx ok
+@c            find_module ok
+@c              gconv_find_shlib (ok)
+@c              ->init_fct (assumed ok)
+@c            gconv_get_builtin_trans ok
+@c            gconv_release_step ok
+@c          do_lookup_alias ok
+@c          find_derivation ok
+@c            derivation_lookup ok
+@c            increment_counter ok
+@c              gconv_find_shlib ok
+@c              step->init_fct (assumed ok)
+@c            gen_steps ok
+@c              gconv_find_shlib ok
+@c                dlopen (presumed ok)
+@c                dlsym (presumed ok)
+@c              step->init_fct (assumed ok)
+@c              step->end_fct (assumed ok)
+@c              gconv_get_builtin_trans ok
+@c              gconv_release_step ok
+@c            add_derivation ok
+@c      gconv_close_transform ok
+@c        gconv_release_step ok
+@c          step->end_fct (assumed ok)
+@c          gconv_release_shlib ok
+@c            dlclose (presumed ok)
+@c        gconv_release_cache ok
+@c  ->tomb->__fct (assumed ok)
 The @code{wcrtomb} function (``wide character restartable to
 multibyte'') converts a single wide character into a multibyte string
 corresponding to that wide character.
@@ -955,6 +1018,7 @@
 @comment wchar.h
 @comment ISO
 @deftypefun size_t mbsrtowcs (wchar_t *restrict @var{dst}, const char **restrict @var{src}, size_t @var{len}, mbstate_t *restrict @var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:mbsrtowcs/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{mbsrtowcs} function (``multibyte string restartable to wide
 character string'') converts a NUL-terminated multibyte character
 string at @code{*@var{src}} into an equivalent wide character string,
@@ -1039,6 +1103,7 @@
 @comment wchar.h
 @comment ISO
 @deftypefun size_t wcsrtombs (char *restrict @var{dst}, const wchar_t **restrict @var{src}, size_t @var{len}, mbstate_t *restrict @var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:wcsrtombs/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{wcsrtombs} function (``wide character string restartable to
 multibyte string'') converts the NUL-terminated wide character string at
 @code{*@var{src}} into an equivalent multibyte character string and
@@ -1084,6 +1149,7 @@
 @comment wchar.h
 @comment GNU
 @deftypefun size_t mbsnrtowcs (wchar_t *restrict @var{dst}, const char **restrict @var{src}, size_t @var{nmc}, size_t @var{len}, mbstate_t *restrict @var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:mbsnrtowcs/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{mbsnrtowcs} function is very similar to the @code{mbsrtowcs}
 function.  All the parameters are the same except for @var{nmc}, which is
 new.  The return value is the same as for @code{mbsrtowcs}.
@@ -1136,6 +1202,7 @@
 @comment wchar.h
 @comment GNU
 @deftypefun size_t wcsnrtombs (char *restrict @var{dst}, const wchar_t **restrict @var{src}, size_t @var{nwc}, size_t @var{len}, mbstate_t *restrict @var{ps})
+@safety{@prelim{}@mtunsafe{@mtasurace{:wcsnrtombs/!ps}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{wcsnrtombs} function implements the conversion from wide
 character strings to multibyte character strings.  It is similar to
 @code{wcsrtombs} but, just like @code{mbsnrtowcs}, it takes an extra
@@ -1280,6 +1347,7 @@
 @comment stdlib.h
 @comment ISO
 @deftypefun int mbtowc (wchar_t *restrict @var{result}, const char *restrict @var{string}, size_t @var{size})
+@safety{@prelim{}@mtunsafe{@mtasurace{}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{mbtowc} (``multibyte to wide character'') function when called
 with non-null @var{string} converts the first multibyte character
 beginning at @var{string} to its corresponding wide character code.  It
@@ -1314,6 +1382,7 @@
 @comment stdlib.h
 @comment ISO
 @deftypefun int wctomb (char *@var{string}, wchar_t @var{wchar})
+@safety{@prelim{}@mtunsafe{@mtasurace{}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{wctomb} (``wide character to multibyte'') function converts
 the wide character code @var{wchar} to its corresponding multibyte
 character sequence, and stores the result in bytes starting at
@@ -1353,6 +1422,7 @@
 @comment stdlib.h
 @comment ISO
 @deftypefun int mblen (const char *@var{string}, size_t @var{size})
+@safety{@prelim{}@mtunsafe{@mtasurace{}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{mblen} function with a non-null @var{string} argument returns
 the number of bytes that make up the multibyte character beginning at
 @var{string}, never examining more than @var{size} bytes.  (The idea is
@@ -1391,6 +1461,9 @@
 @comment stdlib.h
 @comment ISO
 @deftypefun size_t mbstowcs (wchar_t *@var{wstring}, const char *@var{string}, size_t @var{size})
+@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
+@c Odd...  Although this was supposed to be non-reentrant, the internal
+@c state is not a static buffer, but an automatic variable.
 The @code{mbstowcs} (``multibyte string to wide character string'')
 function converts the null-terminated string of multibyte characters
 @var{string} to an array of wide character codes, storing not more than
@@ -1431,6 +1504,7 @@
 @comment stdlib.h
 @comment ISO
 @deftypefun size_t wcstombs (char *@var{string}, const wchar_t *@var{wstring}, size_t @var{size})
+@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
 The @code{wcstombs} (``wide character string to multibyte string'')
 function converts the null-terminated wide character array @var{wstring}
 into a string containing multibyte characters, storing not more than
@@ -1618,6 +1692,16 @@
 @comment iconv.h
 @comment XPG2
 @deftypefun iconv_t iconv_open (const char *@var{tocode}, const char *@var{fromcode})
+@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{} @acsfd{}}}
+@c Calls malloc if tocode and/or fromcode are too big for alloca.  Calls
+@c strip and upstr on both, then gconv_open.  strip and upstr call
+@c isalnum_l and toupper_l with the C locale.  gconv_open may MT-safely
+@c tokenize toset, replace unspecified codesets with the current locale
+@c (possibly two different accesses), and finally it calls
+@c gconv_find_transform and initializes the gconv_t result with all the
+@c steps in the conversion sequence, running each one's initializer,
+@c destructing and releasing them all if anything fails.
+
 The @code{iconv_open} function has to be used before starting a
 conversion.  The two parameters this function takes determine the
 source and destination character set for the conversion, and if the
@@ -1682,6 +1766,12 @@
 @comment iconv.h
 @comment XPG2
 @deftypefun int iconv_close (iconv_t @var{cd})
+@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{} @ascuheap{} @asulock{} @ascudlopen{}}@acunsafe{@acucorrupt{} @aculock{} @acsmem{}}}
+@c Calls gconv_close to destruct and release each of the conversion
+@c steps, release the gconv_t object, then call gconv_close_transform.
+@c Access to the gconv_t object is not guarded, but calling iconv_close
+@c concurrently with any other use is undefined.
+
 The @code{iconv_close} function frees all resources associated with the
 handle @var{cd}, which must have been returned by a successful call to
 the @code{iconv_open} function.
@@ -1708,6 +1798,10 @@
 @comment iconv.h
 @comment XPG2
 @deftypefun size_t iconv (iconv_t @var{cd}, char **@var{inbuf}, size_t *@var{inbytesleft}, char **@var{outbuf}, size_t *@var{outbytesleft})
+@safety{@prelim{}@mtsafe{@mtsrace{:cd}}@assafe{}@acunsafe{@acucorrupt{}}}
+@c Without guarding access to the iconv_t object pointed to by cd, call
+@c the conversion function to convert inbuf or flush the internal
+@c conversion state.
 @cindex stateful
 The @code{iconv} function converts the text in the input buffer
 according to the rules associated with the descriptor @var{cd} and

Modified: fsf/trunk/libc/ports/ChangeLog.aarch64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.aarch64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.aarch64 Thu Jan 30 00:01:58 2014
@@ -1,3 +1,7 @@
+2014-01-22  Marcus Shawcroft  <marcus.shawcroft@xxxxxxx>
+
+	* sysdeps/aarch64/libm-test-ulps: Regenerated.
+
 2014-01-20  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/aarch64/Makefile (abi-lp64_be-options): Fix

Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Thu Jan 30 00:01:58 2014
@@ -1,3 +1,8 @@
+2013-01-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/ia64/setjmp.S: Remove spaces before
+	tabs.
+
 2014-01-06  Mike Frysinger  <vapier@xxxxxxxxxx>
 
 	* sysdeps/ia64/fpu/libm-test-ulps: Update after truncating.

Modified: fsf/trunk/libc/ports/sysdeps/aarch64/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/aarch64/libm-test-ulps (original)
+++ fsf/trunk/libc/ports/sysdeps/aarch64/libm-test-ulps Thu Jan 30 00:01:58 2014
@@ -13401,22 +13401,9 @@
 Test "exp_upward (-0xf.ffffffffffff8p+1020)":
 double: 1
 idouble: 1
-ildouble: 1
-ldouble: 1
-Test "exp_upward (-0xf.ffffffffffffbffffffffffffcp+1020)":
-ildouble: 1
-ldouble: 1
-Test "exp_upward (-0xf.fffffffffffffffffffffffffff8p+16380)":
-ildouble: 1
-ldouble: 1
-Test "exp_upward (-0xf.fffffffffffffffp+16380)":
-ildouble: 1
-ldouble: 1
 Test "exp_upward (-0xf.fffffp+124)":
 double: 1
 idouble: 1
-ildouble: 1
-ldouble: 1
 Test "exp_upward (0x1p+0)":
 double: 1
 idouble: 1
@@ -18595,8 +18582,6 @@
 Function: "exp_upward":
 double: 1
 idouble: 1
-ildouble: 1
-ldouble: 1
 
 Function: "expm1":
 double: 1

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/setjmp.S Thu Jan 30 00:01:58 2014
@@ -20,48 +20,48 @@
    jmp_buf!
 
 
-  	offset:	description:
+	offset:	description:
 	-------	------------
-  	0x000	stack pointer (r12)	; unchangeable (see _JMPBUF_UNWINDS)
-  	0x008	r1 (gp)
+	0x000	stack pointer (r12)	; unchangeable (see _JMPBUF_UNWINDS)
+	0x008	r1 (gp)
 	0x010	caller's unat
 	0x018	fpsr			; disabled per the C standard; BZ 16379
-  	0x020	r4
-  	0x028	r5
-  	0x030	r6
-  	0x038	r7
-  	0x040	rp (b0)
-  	0x048	b1
-  	0x050	b2
-  	0x058	b3
-  	0x060	b4
-  	0x068	b5
-  	0x070	ar.pfs
-  	0x078	ar.lc
-  	0x080	pr
-  	0x088	ar.bsp			; unchangeable (see __longjmp.S)
-  	0x090	ar.unat
+	0x020	r4
+	0x028	r5
+	0x030	r6
+	0x038	r7
+	0x040	rp (b0)
+	0x048	b1
+	0x050	b2
+	0x058	b3
+	0x060	b4
+	0x068	b5
+	0x070	ar.pfs
+	0x078	ar.lc
+	0x080	pr
+	0x088	ar.bsp			; unchangeable (see __longjmp.S)
+	0x090	ar.unat
 	0x098	&__jmp_buf	; address of the jmpbuf (needed to locate NaT bits in unat)
 	0x0a0	 f2
 	0x0b0	 f3
 	0x0c0	 f4
 	0x0d0	 f5
 	0x0e0	f16
-  	0x0f0	f17
-  	0x100	f18
-  	0x110	f19
-  	0x120	f20
-  	0x130	f21
-  	0x130	f22
-  	0x140	f23
-  	0x150	f24
-  	0x160	f25
-  	0x170	f26
-  	0x180	f27
-  	0x190	f28
-  	0x1a0	f29
-  	0x1b0	f30
-  	0x1c0	f31 */
+	0x0f0	f17
+	0x100	f18
+	0x110	f19
+	0x120	f20
+	0x130	f21
+	0x130	f22
+	0x140	f23
+	0x150	f24
+	0x160	f25
+	0x170	f26
+	0x180	f27
+	0x190	f28
+	0x1a0	f29
+	0x1b0	f30
+	0x1c0	f31 */
 
 #include <sysdep.h>
 #include <features.h>

Modified: fsf/trunk/libc/sysdeps/x86/fpu/bits/mathinline.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86/fpu/bits/mathinline.h (original)
+++ fsf/trunk/libc/sysdeps/x86/fpu/bits/mathinline.h Thu Jan 30 00:01:58 2014
@@ -384,7 +384,7 @@
 # endif
 #endif
 
-#ifndef __x86_64__
+#ifndef __SSE2_MATH__
 # if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
      && defined __OPTIMIZE__)
 
@@ -970,4 +970,4 @@
 		    return __value;)
 # endif
 
-#endif /* !__x86_64__ */
+#endif /* !__SSE2_MATH__ */

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