Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 May 2014 11:21:19 -0500
From:      Pedro Giffuni <pfg@freebsd.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r265231 - head/contrib/gcc/config/i386
Message-ID:  <5363C5FF.7050602@freebsd.org>
In-Reply-To: <201405021615.s42GFYH2030996@svn.freebsd.org>
References:  <201405021615.s42GFYH2030996@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 05/02/14 11:15, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Fri May  2 16:15:34 2014
> New Revision: 265231
> URL: http://svnweb.freebsd.org/changeset/base/265231
>
> Log:
>    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)
>    MFC after:	1 week

I only plan to merge this to 10/stable since I am not really using 9/stable
and I don't like running "risks" before a release.

The fix looks interesting though so feel free to try to convince me
if you have tested it :).

Pedro.
> Modified:
>    head/contrib/gcc/config/i386/i386.c
>
> Modified: head/contrib/gcc/config/i386/i386.c
> ==============================================================================
> --- head/contrib/gcc/config/i386/i386.c	Fri May  2 15:52:50 2014	(r265230)
> +++ head/contrib/gcc/config/i386/i386.c	Fri May  2 16:15:34 2014	(r265231)
> @@ -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?5363C5FF.7050602>