public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: gdb@sources.redhat.com
Subject: MAX_SECTIONS is way too small
Date: Wed, 14 May 2003 22:46:00 -0000	[thread overview]
Message-ID: <200305142246.h4EMkLJw002046@doubledemon.codesourcery.com> (raw)


Presently, MAX_SECTIONS and SECT_OFF_MAX are set to 64.

That's far too small when using G++, which can generate a linkonce
section per template instantiation, yielding thousands of sections in
the output file.  

GDB does not even bother to check SECT_OFF_MAX; it just goes looking
at memory past the end of objfile->section_offsets rather happily.

This problem is the cause of GNATS PR 1171.

It can be easily fixed by bumping MAX_SECTIONS and SECT_OFF_MAX to
larger values; to get that test to work you need to make them about
6000.

But, this should not be a hard-wired constant.

Before, I go fiddling around trying to make these things dynamic, does
anyone have any comments they'd like to make? :-)

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

             reply	other threads:[~2003-05-14 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14 22:46 Mark Mitchell [this message]
2003-05-14 22:58 ` Daniel Jacobowitz

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=200305142246.h4EMkLJw002046@doubledemon.codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=gdb@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).