This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Fix hash table mixup inbfd_simple_get_relocated_section_content
Andrew Cagney <ac131313@redhat.com> writes:
>> Daniel Jacobowitz <drow@mvista.com> writes:
>>
>>> On Wed, Sep 17, 2003 at 06:04:05PM +0200, Andreas Schwab wrote:
>>
>>>> bfd_simple_get_relocated_section_content uses the generic linker
>>>> interface, so it should also use the generic_link_hash_table.
>>
>>>
>>> Hmm, this seems right to me.
>> Posted now to binutils@ where it belongs, but I think this should be
>> added to gdb-6.0 because it also affects add-symbol.
>
> Grrrr :-)
>
> What's the damage without it?
You can get random crashes in generic_link_add_symbol_list because
_bfd_generic_link_add_one_symbol hands out a bfd_link_hash_entry, but a
generic_link_hash_entry is expected, and h->sym remains uninitialized.
The specific case where it happend was gdb debugging a user mode linux
process, and applying add-symbol to a kernel module.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."