This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
MAX_SECTIONS is way too small
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 14 May 2003 15:46:21 -0700
- Subject: MAX_SECTIONS is way too small
- Reply-to: mark at codesourcery dot com
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