From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7072 invoked by alias); 2 Dec 2013 16:40:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7063 invoked by uid 89); 2 Dec 2013 16:40:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Dec 2013 16:40:47 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB2GebPh013056 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Dec 2013 11:40:38 -0500 Received: from redhat.com (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rB2GeX1n014820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 2 Dec 2013 11:40:36 -0500 Date: Mon, 02 Dec 2013 16:40:00 -0000 From: Marek Polacek To: Richard Biener Cc: "Joseph S. Myers" , GCC Patches Subject: Re: [PATCH] Fix PR56344 Message-ID: <20131202164033.GF9986@redhat.com> References: <20130226182733.GG25197@redhat.com> <20130227095625.GA15445@redhat.com> <20130305160621.GG28076@redhat.com> <20130313125702.GF18923@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-12/txt/msg00106.txt.bz2 On Mon, Dec 02, 2013 at 04:01:05PM +0100, Richard Biener wrote: > On Wed, Mar 13, 2013 at 1:57 PM, Marek Polacek wrote: > > Ping. > > Ok. (yay, oldest patch in my review queue ...) ;) thanks. Just to be sure, did you mean to ok this patch (that is, the one with HOST_BITS_PER_INT)? Bootstrap/regtest in progress. 2013-12-02 Marek Polacek PR middle-end/56344 * calls.c (expand_call): Disallow passing huge arguments by value. --- gcc/calls.c.mp4 2013-12-02 17:12:18.621057873 +0100 +++ gcc/calls.c 2013-12-02 17:32:35.523684716 +0100 @@ -3047,6 +3047,15 @@ expand_call (tree exp, rtx target, int i { rtx before_arg = get_last_insn (); + /* We don't allow passing huge (> 2^30 B) arguments + by value. It would cause an overflow later on. */ + if (adjusted_args_size.constant + >= (1 << (HOST_BITS_PER_INT - 1))) + { + sorry ("passing too large argument on stack"); + continue; + } + if (store_one_arg (&args[i], argblock, flags, adjusted_args_size.var != 0, reg_parm_stack_space) Marek