This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Fix an infinite loop placing sections in relocatable objects
- From: Andreas Schwab <schwab at suse dot de>
- To: gdb-patches at sourceware dot org
- Date: Thu, 16 Feb 2006 23:04:31 +0100
- Subject: Re: RFC: Fix an infinite loop placing sections in relocatable objects
- References: <20060216152444.GA22371@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> writes:
> diff -u -p -r1.167 symfile.c
> --- symfile.c 7 Feb 2006 19:40:30 -0000 1.167
> +++ symfile.c 16 Feb 2006 15:21:43 -0000
> @@ -476,6 +476,7 @@ place_section (bfd *abfd, asection *sect
> struct place_section_arg *arg = obj;
> CORE_ADDR *offsets = arg->offsets->offsets, start_addr;
> int done;
> + ULONGEST align = 1 << bfd_get_section_alignment (abfd, sect);
I think bfd_get_section_alignment can return values bigger than 31 in
general, and this is undefined in this case.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."