From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16636 invoked by alias); 6 Mar 2009 01:00:33 -0000 Received: (qmail 16627 invoked by uid 22791); 6 Mar 2009 01:00:32 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Mar 2009 01:00:27 +0000 Received: (qmail 23031 invoked from network); 6 Mar 2009 01:00:26 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Mar 2009 01:00:26 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [commit/Tru64] bring back the Tru64 port to life... Date: Fri, 06 Mar 2009 01:00:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker References: <20090305235503.GK3793@adacore.com> <200903060028.40871.alves.ped@gmail.com> <20090306005753.GG3744@adacore.com> In-Reply-To: <20090306005753.GG3744@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903060100.28738.pedro@codesourcery.com> X-IsSubscribed: yes 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 Mail-Followup-To: gdb-patches@sourceware.org X-SW-Source: 2009-03/txt/msg00074.txt.bz2 On Friday 06 March 2009 00:57:53, Joel Brobecker wrote: > In both cases, if nsecs is zero, we end up allocating less memory > than sizeof (struct lm_info). Intuitively, it seems OK, since we > shouldn't really access the secs array if nsecs is null. Ah, you're right. > > One easy way out is to change the allocation to allocate one extra > entry in the secs array. It's slightly wasteful, but it's just a > few bytes times the number of shared libraries. > > What do you think? > Nah, it's fine as is. Sorry about the noise. :-) -- Pedro Alves