From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27981 invoked by alias); 22 Feb 2012 04:04:34 -0000 Received: (qmail 27972 invoked by uid 22791); 22 Feb 2012 04:04:33 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 22 Feb 2012 04:04:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1M44E2e007348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 Feb 2012 23:04:14 -0500 Received: from spoyarek.redhat.com (vpn1-5-234.ams2.redhat.com [10.36.5.234]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1M448Ur005686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 21 Feb 2012 23:04:12 -0500 Date: Wed, 22 Feb 2012 07:44:00 -0000 From: Siddhesh Poyarekar To: Tom Tromey Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [PATCH] Expand bitpos to LONGEST to allow access to large offsets within a struct Message-ID: <20120222040529.GA19931@spoyarek.redhat.com> References: <20120220132724.GB4753@spoyarek.pnq.redhat.com> <87d397syts.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d397syts.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00469.txt.bz2 On Tue, Feb 21, 2012 at 01:42:23PM -0700, Tom Tromey wrote: > I think this should fix http://sourceware.org/bugzilla/show_bug.cgi?id=7259. > If so, at the top of the ChangeLog, write 'PR symtab/7259:'. > > If it does fix this PR then this suggests a simple test case that > doesn't require a huge allocation. Yes, it does. I'll update the ChangeLog entry. > > Most of the patch seems perfectly fine -- just the logical consequence > of the core change. However there are a few issues, mostly minor. > Thanks for your feedback. I'll work on these and send an updated patch. On Tue, Feb 21, 2012 at 10:02:35PM +0100, Jan Kratochvil wrote: > On top of Tom's comments - have you verified you caught all the cases? > In these cases I use some > typedef struct { LONGEST x; } LONGESTT; > > which is compatible for assignment only with itself catching all the cases. > Unfortunately one needs to adjust by hand all the arithmetic operations just > for the purpose of this verification. > > I guess there exist better static analysis tools for that. > I relied mostly on manual code inspection for this and for gcc to tell me if something is getting truncated. I'll look for a more formal method to make sure I have caught all cases. Thanks, Siddhesh