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

[Commits] r19107 - in /fsf/trunk/libc: ./ manual/ math/ po/ string/ sysdeps/x86_64/



Author: eglibc
Date: Fri Jun 15 00:01:34 2012
New Revision: 19107

Log:
Import glibc-mainline for 2012-06-15

Added:
    fsf/trunk/libc/string/tst-strtok_r.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/manual/Makefile
    fsf/trunk/libc/math/libm-test.inc
    fsf/trunk/libc/po/Makefile
    fsf/trunk/libc/string/Makefile
    fsf/trunk/libc/sysdeps/x86_64/strtok.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jun 15 00:01:34 2012
@@ -1,3 +1,28 @@
+2012-06-14  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
+
+	[BZ #14229]
+	* string/Makefile (tests): Add tst-strtok_r.
+	* string/tst-strtok_r.c: New file.
+	* sysdeps/x86_64/strtok.S: Use LP_SIZE on save_ptr and use
+	RAX_LP/RDX_LP on SAVE_PTR.
+
+2012-06-14  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* manual/Makefile ($(objpfx)texis): Do $(make-target-directory).
+
+2012-06-14  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* libm_test.inc (csqrt_test): Allow more spurious underflow
+	exceptions.
+	(j0_test): Likewise.
+	(j1_test): Likewise.
+	(y0_test): Likewise.
+	(y1_test): Likewise.
+
+2012-06-13  Carlos O'Donell  <carlos_odonell@xxxxxxxxxx>
+
+	* po/Makefile (libc.pot): Use UTF-8 charset.
+
 2012-06-13  Paul Pluzhnikov  <ppluzhnikov@xxxxxxxxxx>
 
 	[BZ #14210]

Modified: fsf/trunk/libc/manual/Makefile
==============================================================================
--- fsf/trunk/libc/manual/Makefile (original)
+++ fsf/trunk/libc/manual/Makefile Fri Jun 15 00:01:34 2012
@@ -51,6 +51,7 @@
 
 -include $(objpfx)texis
 $(objpfx)texis: texis.awk $(chapters) $(add-chapters) $(appendices) $(licenses)
+	$(make-target-directory)
 	$(AWK) -f $^ > $@.T
 	mv -f $@.T $@
 

Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Fri Jun 15 00:01:34 2012
@@ -3211,7 +3211,7 @@
   TEST_c_c (csqrt, 0x1.fffffffffffffp+1023L, 0x1p+1023L, 1.379778091031440685006200821918878702861e+154L, 3.257214233483129514781233066898042490248e+153L);
   /* Bug 14157: spurious exception may occur.  */
   TEST_c_c (csqrt, 0x1p-1074L, 0x1p-1074L, 2.442109726130830256743814843868934877597e-162L, 1.011554969366634726113090867589031782487e-162L, UNDERFLOW_EXCEPTION_OK);
-  TEST_c_c (csqrt, 0x1p-1073L, 0x1p-1073L, 3.453664695497464982856905711457966660085e-162L, 1.430554756764195530630723976279903095110e-162L);
+  TEST_c_c (csqrt, 0x1p-1073L, 0x1p-1073L, 3.453664695497464982856905711457966660085e-162L, 1.430554756764195530630723976279903095110e-162L, UNDERFLOW_EXCEPTION_OK);
 #endif
 
 #if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
@@ -4352,7 +4352,8 @@
   TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L, UNDERFLOW_EXCEPTION_OK);
 
 #ifndef TEST_FLOAT
-  TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L);
+  /* Bug 14155: spurious exception may occur.  */
+  TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L, UNDERFLOW_EXCEPTION_OK);
 #endif
 
   END (j0);
@@ -4393,7 +4394,8 @@
   TEST_f_f (j1, 0x1.3ffp+74L, 1.818984347516051243459364437186082741567e-12L);
 
 #ifndef TEST_FLOAT
-  TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L);
+  /* Bug 14155: spurious exception may occur.  */
+  TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L, UNDERFLOW_EXCEPTION_OK);
 #endif
 
   END (j1);
@@ -8441,7 +8443,8 @@
   TEST_f_f (y0, 0x1.3ffp+74L, 1.818984347516051243459467456433028748678e-12L);
 
 #ifndef TEST_FLOAT
-  TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L);
+  /* Bug 14155: spurious exception may occur.  */
+  TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L, UNDERFLOW_EXCEPTION_OK);
 #endif
 
   END (y0);
@@ -8483,7 +8486,8 @@
   TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L, UNDERFLOW_EXCEPTION_OK);
 
 #ifndef TEST_FLOAT
-  TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L);
+  /* Bug 14155: spurious exception may occur.  */
+  TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L, UNDERFLOW_EXCEPTION_OK);
 #endif
 
   END (y1);

Modified: fsf/trunk/libc/po/Makefile
==============================================================================
--- fsf/trunk/libc/po/Makefile (original)
+++ fsf/trunk/libc/po/Makefile Fri Jun 15 00:01:34 2012
@@ -56,6 +56,7 @@
 	set `date -R`; disp="$$6"; \
 	sed -e 's/VERSION/$(version)/' \
 	    -e "s/DATE/`date +'%Y-%m-%d %H:%M'$$disp`/" \
+	    -e "s/CHARSET/UTF-8/" \
 	    $< > $@.new
 	egrep -v '\.ksh$$' $(word 2,$^) > $(objdir)/tmp-libc.pot-files
 	cd ..; $(XGETTEXT) --keyword=_ --keyword=N_ \

Modified: fsf/trunk/libc/string/Makefile
==============================================================================
--- fsf/trunk/libc/string/Makefile (original)
+++ fsf/trunk/libc/string/Makefile Fri Jun 15 00:01:34 2012
@@ -56,7 +56,7 @@
 		   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry	\
 		   bug-strtok1 $(addprefix test-,$(strop-tests))	\
 		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2		\
-		   bug-strstr1 bug-strchr1
+		   bug-strstr1 bug-strchr1 tst-strtok_r
 
 
 include ../Rules

Added: fsf/trunk/libc/string/tst-strtok_r.c
==============================================================================
--- fsf/trunk/libc/string/tst-strtok_r.c (added)
+++ fsf/trunk/libc/string/tst-strtok_r.c Fri Jun 15 00:01:34 2012
@@ -1,0 +1,38 @@
+/* Test strtok_r regression for BZ #14229.
+   Copyright (C) 2012 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_MAIN
+#define BUF1PAGES 1
+#include "test-string.h"
+
+int
+test_main (void)
+{
+  char line[] = "udf 75868 1 - Live 0xffffffffa0bfb000\n";
+  char **saveptrp;
+  char *tok;
+
+  test_init ();
+
+  /* Check strtok_r won't write beyond the size of (*saveptrp).  */
+  saveptrp = (char **) (buf1 + page_size - sizeof (*saveptrp));
+  tok = strtok_r (line, " \t", saveptrp);
+  return strcmp (tok, "udf") != 0;
+}
+
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/sysdeps/x86_64/strtok.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/strtok.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/strtok.S Fri Jun 15 00:01:34 2012
@@ -1,6 +1,6 @@
 /* strtok (str, delim) -- Return next DELIM separated token from STR.
    For AMD x86-64.
-   Copyright (C) 1998,2000-2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1998-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on i686 version contributed by Ulrich Drepper
    <drepper@xxxxxxxxxx>, 1998.
@@ -45,9 +45,9 @@
 	.bss
 	.local save_ptr
 	ASM_TYPE_DIRECTIVE (save_ptr, @object)
-	.size save_ptr, 8
+	.size save_ptr, LP_SIZE
 save_ptr:
-	.space 8
+	.space LP_SIZE
 
 # ifdef PIC
 #  define SAVE_PTR save_ptr(%rip)
@@ -79,13 +79,12 @@
 
 #ifdef USE_AS_STRTOK_R
 	/* The value is stored in the third argument.  */
-	movq %rdx, %rax
-	movq %rdx, %r9		/* Save value - see def. of SAVE_PTR.  */
-	movq (%rax), %rax
+	mov %RDX_LP, %R9_LP	/* Save value - see def. of SAVE_PTR.  */
+	mov (%rdx), %RAX_LP
 #else
 	/* The value is in the local variable defined above.  But
 	   we have to take care for PIC code.  */
-	movq SAVE_PTR, %rax
+	mov SAVE_PTR, %RAX_LP
 #endif
 	movq %r8, %rdx		/* Get start of string.  */
 
@@ -194,7 +193,7 @@
 	cmovne %rcx, %rdx
 
 	/* Store the pointer to the next character.  */
-	movq %rdx, SAVE_PTR
+	mov %RDX_LP, SAVE_PTR
 
 L(epilogue):
 	/* Remove the stopset table.  */
@@ -205,7 +204,7 @@
 L(returnNULL):
 	xorl %eax, %eax
 	/* Store the pointer to the next character.  */
-	movq %rdx, SAVE_PTR
+	mov %RDX_LP, SAVE_PTR
 	jmp L(epilogue)
 
 END (BP_SYM (FUNCTION))

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