From owner-svn-src-all@FreeBSD.ORG Fri May 2 16:15:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACEC9FFF; Fri, 2 May 2014 16:15:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99D901D11; Fri, 2 May 2014 16:15:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s42GFYj5030997; Fri, 2 May 2014 16:15:34 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s42GFYH2030996; Fri, 2 May 2014 16:15:34 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201405021615.s42GFYH2030996@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 2 May 2014 16:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265231 - head/contrib/gcc/config/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 16:15:34 -0000 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 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; }