From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6A213857709; Thu, 26 Oct 2023 14:55:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6A213857709 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698332101; bh=ZHKst5Irlc2RFC14DoFmYndCKNAtvCR3KZLpDiz/qm8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uYUHtLELY0k6MNAPTzoS/xnimsHZQU9CMG2lDUBIq0zKZKNS+Emfg910YHZPp4tJX bsg8Ou8avx+KwOYTiU/R+FwYFn65srZ/u6GklM2y9PdBkpNPJH2GDzoQE2V3wExGx/ jDPK9swg3arv3cUZvmRluxw9+RmH8RWUoIfaXUEI= From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug libdw/30967] Discriminator in Dwarf_Line_s may exceed 24 bits Date: Thu, 26 Oct 2023 14:55:01 +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: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30967 --- Comment #6 from Mark Wielaard --- So my preferred workaround: diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index df003c5f..69e10c7b 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -129,6 +129,12 @@ add_new_line (struct line_state *state, struct linelist *new_line) return true; \ } while (0) + /* Same as above, but don't flag as "invalid" just use truncated + value. Used for discriminator for which llvm might use a value + that won't fit 24 bits. */ +#define SETX(field) \ + new_line->line.field =3D state->field; \ + SET (addr); SET (op_index); SET (file); @@ -140,7 +146,7 @@ add_new_line (struct line_state *state, struct linelist *new_line) SET (prologue_end); SET (epilogue_begin); SET (isa); - SET (discriminator); + SETX (discriminator); SET (context); SET (function_name); https://code.wildebeest.org/git/user/mjw/elfutils/commit/?h=3Dreally-large-= disc --=20 You are receiving this mail because: You are on the CC list for the bug.=