From: Pedro Alves <alves.ped@gmail.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: Re: [commit/Tru64] bring back the Tru64 port to life...
Date: Fri, 06 Mar 2009 00:28:00 -0000 [thread overview]
Message-ID: <200903060028.40871.alves.ped@gmail.com> (raw)
In-Reply-To: <20090305235503.GK3793@adacore.com>
Not knowing a thing about tru64 or osf,
On Thursday 05 March 2009 23:55:03, Joel Brobecker wrote:
> /* Allocate section space. */
> - so->lm_info = xmalloc ((unsigned) &(((struct lm_info *)0)->secs) +
> - nsecs * sizeof *so->lm_info);
> + so->lm_info = xmalloc (sizeof (struct lm_info)
> + + (nsecs - 1) * sizeof (struct lm_sec));
Can nsecs be 0 here? Since it is checked at least here:
static void
osf_relocate_section_addresses (struct so_list *so,
struct section_table *sec)
{
(...)
if (lmi->nsecs && !lmi->secs[0].name)
fetch_sec_names (lmi);
If, so, you'll allocate less memory than you want in that
case.
--
Pedro Alves
next prev parent reply other threads:[~2009-03-06 0:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 23:55 Joel Brobecker
2009-03-06 0:28 ` Pedro Alves [this message]
2009-03-06 0:58 ` Joel Brobecker
2009-03-06 1:00 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200903060028.40871.alves.ped@gmail.com \
--to=alves.ped@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox