This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[Bug libdw/22546] dwarf_aggregate_size() doesn't work for multi-dimensional arrays
- From: "mark at klomp dot org" <sourceware-bugzilla at sourceware dot org>
- To: elfutils-devel at sourceware dot org
- Date: Mon, 11 Dec 2017 16:31:06 +0000
- Subject: [Bug libdw/22546] dwarf_aggregate_size() doesn't work for multi-dimensional arrays
- Auto-submitted: auto-generated
- References: <bug-22546-10460@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22546
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #5 from Mark Wielaard <mark at klomp dot org> ---
Thanks I think you are right. I am looking at how to correctly handle the
stride. I believe this only happens with Fortran code.
While reviewing the code I noticed something else that looks wrong.
Independent from what you discovered.
We do the following:
dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size)
{
Dwarf_Die type_mem;
if (INTUSE (dwarf_peel_type) (die, die) != 0)
return -1;
return aggregate_size (die, size, &type_mem);
}
The caller probably doesn't really care, but it isn't really nice to change the
die the caller gave us. So I propose to change it like so:
int
dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size)
{
Dwarf_Die die_mem, type_mem;
if (INTUSE (dwarf_peel_type) (die, &die_mem) != 0)
return -1;
return aggregate_size (&die_mem, size, &type_mem);
}
Just wanted to note that before I forgot investigating the real issue.
--
You are receiving this mail because:
You are on the CC list for the bug.