From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18822 invoked by alias); 13 May 2005 15:40:11 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18133 invoked from network); 13 May 2005 15:39:46 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 13 May 2005 15:39:46 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DWcGQ-0002Q4-02; Fri, 13 May 2005 11:39:46 -0400 Date: Fri, 13 May 2005 15:40:00 -0000 From: Daniel Jacobowitz To: "Cuthbertson, Reva D." Cc: gdb@sources.redhat.com Subject: Re: Is it possible to overflow baton->size in dwarf_mark_symbols_computed() in dwarf2read.c? Message-ID: <20050513153945.GA9246@nevyn.them.org> Mail-Followup-To: "Cuthbertson, Reva D." , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00152.txt.bz2 On Fri, May 13, 2005 at 08:37:41AM -0700, Cuthbertson, Reva D. wrote: > Yes, I ran into the problem. I tried changing the declaration of the > "size" field in dwarf2_loclist_baton and dwarf2_locexpr_baton in > dwarf2loc.h to be an unsigned integer instead and that seemed to fix the > problem I encountered. Do you think this a reasonable solution? No. It should saturate instead; it only needs to be longer than any supported location list/expression, and 64k is entirely reasonable for that. Int would waste a lot of memory. Could you try that? Something like if (expression < 65536) ->size = expression; else size = 65535; -- Daniel Jacobowitz CodeSourcery, LLC