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 master updated. glibc-2.26-566-g8644588


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, master has been updated
       via  8644588807215ab09716ac04a150f91ac83acffd (commit)
       via  e8dbd6a36d8e4d30e736e28a364f7a4d1404079a (commit)
       via  179dcdb7af4983fd42824db748ee6cb05f8d71cf (commit)
      from  006e766437033d6565133ce356b55d7b301a7b58 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8644588807215ab09716ac04a150f91ac83acffd

commit 8644588807215ab09716ac04a150f91ac83acffd
Author: James Clarke <jrtc27@jrtc27.com>
Date:   Fri Oct 13 15:44:39 2017 -0300

    Fix TLS relocations against local symbols on powerpc32, sparc32 and sparc64
    
    Normally, TLS relocations against local symbols are optimised by the linker
    to be absolute.  However, gold does not do this, and so it is possible to
    end up with, for example, R_SPARC_TLS_DTPMOD64 referring to a local symbol.
    Since sym_map is left as null in elf_machine_rela for the special local
    symbol case, the relocation handling thinks it has nothing to do, and so
    the module gets left as 0.  Havoc then ensues when the variable in question
    is accessed.
    
    Before this fix, the main_local_gold program would receive a SIGBUS on
    sparc64, and SIGSEGV on powerpc32.  With this fix applied, that test now
    passes like the rest of them.
    
    	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela):
    	Assign sym_map to be map for local symbols, as TLS relocations
    	use sym_map to determine whether the symbol is defined and to
    	extract the TLS information.
    	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
    	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 4cc5301..5effbd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-10-13  James Clarke  <jrtc27@jrtc27.com>
+
+	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela):
+	Assign sym_map to be map for local symbols, as TLS relocations
+	use sym_map to determine whether the symbol is defined and to
+	extract the TLS information.
+	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
+	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
+
 2017-10-13  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
 	[BZ #22189]
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h
index 1f8437e..c19b3b7 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.h
+++ b/sysdeps/powerpc/powerpc32/dl-machine.h
@@ -310,7 +310,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
      against local symbols.  */
   if (__builtin_expect (ELF32_ST_BIND (sym->st_info) == STB_LOCAL, 0)
       && sym->st_shndx != SHN_UNDEF)
-    value = map->l_addr;
+    {
+      sym_map = map;
+      value = map->l_addr;
+    }
   else
     {
       sym_map = RESOLVE_MAP (&sym, version, r_type);
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 436e4e6..debf67b 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -376,6 +376,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
   if (__builtin_expect (ELF32_ST_BIND (sym->st_info) == STB_LOCAL, 0)
       && sym->st_shndx != SHN_UNDEF)
     {
+      sym_map = map;
       value = map->l_addr;
     }
   else
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index c2871dc..e1ec7a5 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -403,6 +403,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
   if (__builtin_expect (ELF64_ST_BIND (sym->st_info) == STB_LOCAL, 0)
       && sym->st_shndx != SHN_UNDEF)
     {
+      sym_map = map;
       value = map->l_addr;
     }
   else

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8dbd6a36d8e4d30e736e28a364f7a4d1404079a

commit e8dbd6a36d8e4d30e736e28a364f7a4d1404079a
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Fri Oct 13 15:44:39 2017 -0300

    powerpc: Avoid putting floating point values in memory [BZ #22189]
    
    	[BZ #22189]
    	* sysdeps/powerpc/fpu/math_private.h (math_opt_barrier):
    	(math_force_eval): Add powerpc version.

diff --git a/ChangeLog b/ChangeLog
index 500d104..4cc5301 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-10-13  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
+	[BZ #22189]
+	* sysdeps/powerpc/fpu/math_private.h (math_opt_barrier):
+	(math_force_eval): Add powerpc version.
+
 	[BZ #22142]
 	* stdio-common/tst-printf.c (fp_test): Add tests for DBL_MAX and
 	-DBL_MAX.
diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h
index 396fd05..472182d 100644
--- a/sysdeps/powerpc/fpu/math_private.h
+++ b/sysdeps/powerpc/fpu/math_private.h
@@ -23,6 +23,13 @@
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
 #include <fenv_private.h>
+
+/* Avoid putting floating point values in memory.  */
+# define math_opt_barrier(x)					\
+  ({ __typeof (x) __x = (x); __asm ("" : "+dwa" (__x)); __x; })
+# define math_force_eval(x)						\
+  ({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "dwa" (__x)); })
+
 #include_next <math_private.h>
 
 #if defined _ARCH_PWR9 && __HAVE_DISTINCT_FLOAT128

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=179dcdb7af4983fd42824db748ee6cb05f8d71cf

commit 179dcdb7af4983fd42824db748ee6cb05f8d71cf
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Fri Oct 13 15:44:39 2017 -0300

    [BZ #22142] powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7
    
    Fix the ifdef clause that was being used in the opposite way, setting
    a wrong value of the carry bit.
    
    This is also correcting 2 memory accesses that were mistakenly referring
    to r0 while they were supposed to mean the immediate value 0.
    
    	[BZ #22142]
    	* stdio-common/tst-printf.c (fp_test): Add tests for DBL_MAX and
    	-DBL_MAX.
    	(do_test): Likewise.
    	* stdio-common/tst-printf.sh: Likewise.
    	* sysdeps/powerpc/powerpc64/power7/add_n.S: Invert the initial
    	ifdef clause in order to set the carry bit right.  Replace r0 by
    	0 without changing the behavior.

diff --git a/ChangeLog b/ChangeLog
index 514873b..500d104 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-10-13  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+	[BZ #22142]
+	* stdio-common/tst-printf.c (fp_test): Add tests for DBL_MAX and
+	-DBL_MAX.
+	(do_test): Likewise.
+	* stdio-common/tst-printf.sh: Likewise.
+	* sysdeps/powerpc/powerpc64/power7/add_n.S: Invert the initial
+	ifdef clause in order to set the carry bit right.  Replace r0 by
+	0 without changing the behavior.
+
 2017-10-13  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/sparc/sparc32/fpu/s_fabsl.c: Include
diff --git a/stdio-common/tst-printf.c b/stdio-common/tst-printf.c
index b6d62a5..162effa 100644
--- a/stdio-common/tst-printf.c
+++ b/stdio-common/tst-printf.c
@@ -136,6 +136,8 @@ fp_test (void)
   }
   printf("%10s\n", (char *) NULL);
   printf("%-10s\n", (char *) NULL);
+  printf("%.8f\n", DBL_MAX);
+  printf("%.8f\n", -DBL_MAX);
 }
 
 static int
@@ -181,6 +183,8 @@ I am ready for my first lesson today.";
   printf("null string:\t\"%s\"\n", (char *)NULL);
   printf("limited string:\t\"%.22s\"\n", longstr);
 
+  printf("a-style max:\t\"%a\"\n", DBL_MAX);
+  printf("a-style -max:\t\"%a\"\n", -DBL_MAX);
   printf("e-style >= 1:\t\"%e\"\n", 12.34);
   printf("e-style >= .1:\t\"%e\"\n", 0.1234);
   printf("e-style < .1:\t\"%e\"\n", 0.001234);
diff --git a/stdio-common/tst-printf.sh b/stdio-common/tst-printf.sh
index c413980..48cb62c 100644
--- a/stdio-common/tst-printf.sh
+++ b/stdio-common/tst-printf.sh
@@ -57,6 +57,8 @@ space-padded string:	"    Hi, Z."
 left-adjusted S string:	"Hi, Z.    "
 null string:	"(null)"
 limited string:	"Good morning, Doctor C"
+a-style max:	"0x1.fffffffffffffp+1023"
+a-style -max:	"-0x1.fffffffffffffp+1023"
 e-style >= 1:	"1.234000e+01"
 e-style >= .1:	"1.234000e-01"
 e-style < .1:	"1.234000e-03"
@@ -124,6 +126,8 @@ prefix  6d      6o      6x      6X      6u
     % |  -123 |   377 |    ff |    FF |4294967295 |
     (null)
 (null)    
+179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000
+-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000
 1.234568e+06 should be 1.234568e+06
 1234567.800000 should be 1234567.800000
 1.23457e+06 should be 1.23457e+06
@@ -173,6 +177,8 @@ space-padded string:	"    Hi, Z."
 left-adjusted S string:	"Hi, Z.    "
 null string:	"(null)"
 limited string:	"Good morning, Doctor C"
+a-style max:	"0x1.fffffffffffffp+1023"
+a-style -max:	"-0x1.fffffffffffffp+1023"
 e-style >= 1:	"1.234000e+01"
 e-style >= .1:	"1.234000e-01"
 e-style < .1:	"1.234000e-03"
@@ -240,6 +246,8 @@ prefix  6d      6o      6x      6X      6u
     % |  -123 |   377 |    ff |    FF |4294967295 |
     (null)
 (null)    
+179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000
+-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000
 1.234568e+06 should be 1.234568e+06
 1234567.800000 should be 1234567.800000
 1.23457e+06 should be 1.23457e+06
diff --git a/sysdeps/powerpc/powerpc64/power7/add_n.S b/sysdeps/powerpc/powerpc64/power7/add_n.S
index 02335c1..88aec84 100644
--- a/sysdeps/powerpc/powerpc64/power7/add_n.S
+++ b/sysdeps/powerpc/powerpc64/power7/add_n.S
@@ -38,17 +38,17 @@
 
 ENTRY_TOCLESS (FUNC, 5)
 #ifdef USE_AS_SUB
-	addic	r0, r0, 0
+	addic	r0, r1, -1
 #else
-	addic   r0, r1, -1
+	addic	r0, r0, 0
 #endif
 	andi.	r7, N, 1
 	beq	L(bx0)
 
 	ld	r7, 0(UP)
-	ld	r9, r0(VP)
+	ld	r9, 0(VP)
 	ADDSUBC	r11, r9, r7
-	std	r11, r0(RP)
+	std	r11, 0(RP)
 	cmpldi	N, N, 1
 	beq	N, L(end)
 	addi	UP, UP, 8

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

Summary of changes:
 ChangeLog                                |   24 ++++++++++++++++++++++++
 stdio-common/tst-printf.c                |    4 ++++
 stdio-common/tst-printf.sh               |    8 ++++++++
 sysdeps/powerpc/fpu/math_private.h       |    7 +++++++
 sysdeps/powerpc/powerpc32/dl-machine.h   |    5 ++++-
 sysdeps/powerpc/powerpc64/power7/add_n.S |    8 ++++----
 sysdeps/sparc/sparc32/dl-machine.h       |    1 +
 sysdeps/sparc/sparc64/dl-machine.h       |    1 +
 8 files changed, 53 insertions(+), 5 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]