This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Fix an infinite loop placing sections in relocatable objects


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]