diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-02-17 08:32:22 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-02-17 08:32:22 +0100 |
commit | 024a23103f04282872d4352302b1bfe04391a7a4 (patch) | |
tree | bf0fa2895130e33389016dbb4c6625c2aed12464 /bfd/elf32-xtensa.c | |
parent | e7d1c40ce59ff355d2a51ff64a657c772eabbbfe (diff) | |
download | gdb-024a23103f04282872d4352302b1bfe04391a7a4.zip gdb-024a23103f04282872d4352302b1bfe04391a7a4.tar.gz gdb-024a23103f04282872d4352302b1bfe04391a7a4.tar.bz2 |
PR binutils/16595
abfd->section_count unexpectedly changes between 218 and 248 in:
150 bfd_simple_get_relocated_section_contents (bfd *abfd,
[...]
218 saved_offsets = malloc (sizeof (struct saved_output_info)
219 * abfd->section_count);
[...]
230 _bfd_generic_link_add_symbols (abfd, &link_info);
[...]
248 bfd_map_over_sections (abfd, simple_restore_output_info, saved_offsets);
_bfd_generic_link_add_symbols increases section_count
and simple_restore_output_info later reads unallocated part of saved_offsets.
READ of size 8 at 0x601c0000c5c0 thread T0
#0 0x1124770 in simple_restore_output_info (.../gdb/gdb+0x1124770)
#1 0x10ecd51 in bfd_map_over_sections (.../gdb/gdb+0x10ecd51)
#2 0x1125150 in bfd_simple_get_relocated_section_contents (.../gdb/gdb+0x1125150)
bfd/
2014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
PR binutils/16595
* simple.c (struct saved_offsets): New.
(simple_save_output_info): Use it for ptr.
(simple_restore_output_info): Use it for ptr. Check section_count.
(bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
Diffstat (limited to 'bfd/elf32-xtensa.c')
0 files changed, 0 insertions, 0 deletions