From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91670 invoked by alias); 11 Dec 2017 16:31:10 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 91475 invoked by uid 48); 11 Dec 2017 16:31:07 -0000 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug libdw/22546] dwarf_aggregate_size() doesn't work for multi-dimensional arrays Date: Mon, 11 Dec 2017 16:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2017-q4/txt/msg00099.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D22546 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #5 from Mark Wielaard --- 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) !=3D 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) !=3D 0) return -1; return aggregate_size (&die_mem, size, &type_mem); } Just wanted to note that before I forgot investigating the real issue. --=20 You are receiving this mail because: You are on the CC list for the bug.