From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11914 invoked by alias); 5 Mar 2013 16:06:42 -0000 Received: (qmail 11902 invoked by uid 22791); 5 Mar 2013 16:06:41 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Mar 2013 16:06:28 +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 r25G6Pgp007767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Mar 2013 11:06:26 -0500 Received: from redhat.com (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r25G6M6s029610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 5 Mar 2013 11:06:24 -0500 Date: Tue, 05 Mar 2013 16:06:00 -0000 From: Marek Polacek To: Richard Biener Cc: "Joseph S. Myers" , GCC Patches Subject: Re: [PATCH] Fix PR56344 Message-ID: <20130305160621.GG28076@redhat.com> References: <20130226182733.GG25197@redhat.com> <20130227095625.GA15445@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) 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 X-SW-Source: 2013-03/txt/msg00192.txt.bz2 On Fri, Mar 01, 2013 at 09:41:27AM +0100, Richard Biener wrote: > On Wed, Feb 27, 2013 at 6:38 PM, Joseph S. Myers > wrote: > > On Wed, 27 Feb 2013, Richard Biener wrote: > > > >> Wouldn't it be better to simply pass this using the variable size handling > >> code? Thus, initialize args_size.var for too large constant size instead? > > > > Would that be compatible with the ABI definition of how a large (constant > > size) argument should be passed? > > I'm not sure. Another alternative is to expand to __builtin_trap (), but that's > probably not easy at this very point. > > Or simply fix the size calculation to not overflow (either don't count bits > or use a double-int). I don't think double_int will help us here. We won't detect overflow, because we overflowed here (when lower_bound is an int): lower_bound = INTVAL (XEXP (XEXP (arg->stack_slot, 0), 1)); The value from INTVAL () fits when lower_bound is a double_int, but then: i = lower_bound; ... stack_usage_map[i] the size of stack_usage_map is stored in highest_outgoing_arg_in_use, which is an int, so we're limited by an int size here. Changing the type of highest_outgoing_arg_in_use from an int to a double_int isn't worth the trouble, IMHO. Maybe the original approach, only with sorry () instead of error () and e.g. HOST_BITS_PER_INT - 1 instead of 30 would be appropriate after all. Dunno. Marek