It seems we now have analysis that concludes these buffers may possibly
overflow. This broke bootstrap on ppc64 BE. Bootstrap passed on ppc64 BE
power7. Committing as pre-approved by Segher.


2016-10-06  Aaron Sawdey  <acsaw...@linux.vnet.ibm.com>

        * config/rs6000/rs6000.c (rs6000_elf_asm_out_constructor)
        (rs6000_elf_asm_out_destructor): increase size of buf to avoid
        possible overflow.


Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c  (revision 240846)
+++ gcc/config/rs6000/rs6000.c  (working copy)
@@ -34166,7 +34166,7 @@
 rs6000_elf_asm_out_constructor (rtx symbol, int priority)
 {
   const char *section = ".ctors";
-  char buf[16];
+  char buf[18];

   if (priority != DEFAULT_INIT_PRIORITY)
     {
@@ -34197,7 +34197,7 @@
 rs6000_elf_asm_out_destructor (rtx symbol, int priority)
 {
   const char *section = ".dtors";
-  char buf[16];
+  char buf[18];

   if (priority != DEFAULT_INIT_PRIORITY)
     {
-- 
Aaron Sawdey, Ph.D.  acsaw...@linux.vnet.ibm.com
050-2/C113  (507) 253-7520 home: 507/263-0782
IBM Linux Technology Center - PPC Toolchain

Reply via email to