]> sourceware.org Git - libabigail.git/commit
Bug 22190 - crash in read_context::get_or_compute_canonical_die
authorDodji Seketeli <dodji@redhat.com>
Wed, 27 Sep 2017 13:49:41 +0000 (15:49 +0200)
committerDodji Seketeli <dodji@redhat.com>
Wed, 27 Sep 2017 14:00:14 +0000 (16:00 +0200)
commit8d0ce1030598a4f0ae07c43be259d5016cc0ef67
tree51113630cfbc1389bad2ab71a361cadf255e7cc2
parentb91b8a280d68d61503bd36f5ec6ca7461b4548d4
Bug 22190 - crash in read_context::get_or_compute_canonical_die

When computing a canonical DIE while reading DWARF, we crash in
get_or_compute_canonical_die basically because we loop over a vector
using an iterator which gets invalidated during the walk because some
code in the loop can increase the size of the vector (by adding
elements at its end) during the loop.

This patch fixes the issue by looping over the vector without using an
iterator that can be invalidated.  The code now properly expects the
vector to grow during the walk.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc
This page took 0.028689 seconds and 5 git commands to generate.