Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2014 01:30:15 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r265728 - stable/10/contrib/gcc/config/i386
Message-ID:  <201405090130.s491UFl7032105@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Fri May  9 01:30:15 2014
New Revision: 265728
URL: http://svnweb.freebsd.org/changeset/base/265728

Log:
  MFC	r265231:
  
  gcc: fix strict alignment.
  
  From the OpenBSD log:
  
  x86-64 ABI requires arrays greater than 16 bytes to be aligned to
  16byte boundary.  However, GCC 16-byte aligns arrays of >=16 BITS,
  not BYTES.
  
  This diff improves bug detectability for code which has local arrays
  of [16 .. 127] bits:  in those cases SSP will now detect even 1-byte
  overflows.
  
  Obtained from:	OpenBSD (CVS rev 1.4)

Modified:
  stable/10/contrib/gcc/config/i386/i386.c

Modified: stable/10/contrib/gcc/config/i386/i386.c
==============================================================================
--- stable/10/contrib/gcc/config/i386/i386.c	Fri May  9 01:25:25 2014	(r265727)
+++ stable/10/contrib/gcc/config/i386/i386.c	Fri May  9 01:30:15 2014	(r265728)
@@ -14408,7 +14408,7 @@ ix86_local_alignment (tree type, int ali
       if (AGGREGATE_TYPE_P (type)
 	   && TYPE_SIZE (type)
 	   && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
-	   && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 16
+	   && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
 	       || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
 	return 128;
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405090130.s491UFl7032105>