]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: dwarf_aggregate_size() works with multi-dimensional arrays
authorDima Kogan <dkogan@debian.org>
Fri, 8 Dec 2017 09:45:10 +0000 (01:45 -0800)
committerMark Wielaard <mark@klomp.org>
Tue, 12 Dec 2017 09:39:57 +0000 (10:39 +0100)
commita2246aaad96e062eb3bab55af9526aaa70adcfd0
tree26738f3e7701d8be21c8a75bb320205d4dfbcc3d
parent57b7f381e167356fa47d58c18bbc2e856f75ee16
libdw: dwarf_aggregate_size() works with multi-dimensional arrays

If we have a multidimensional array of dimensions (a,b,c) the number of elements
should be a*b*c, but prior to this patch dwarf_aggregate_size() would report
a+b+c instead.

This patch fixes the bug and adds a test that demonstrates the bug (the test
fails without the functional part of this patch).

Fixes: https://sourceware.org/bugzilla/show_bug.cgi?id=22546
Signed-off-by: Dima Kogan <dima@secretsauce.net>
libdw/ChangeLog
libdw/dwarf_aggregate_size.c
tests/ChangeLog
tests/run-aggregate-size.sh
tests/run-peel-type.sh
tests/testfile-sizes3.o.bz2