From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Subject: Re: [PATCH] libdw: Resolve alt file on first use.
Date: Mon, 29 Jan 2018 10:53:00 -0000 [thread overview]
Message-ID: <1517223220.32569.2.camel@klomp.org> (raw)
In-Reply-To: <1516894088.17912.97.camel@klomp.org>
On Thu, 2018-01-25 at 16:28 +0100, Mark Wielaard wrote:
> Testing under valgrind showed that this should be build_id_len <= 0.
> When dwelf_dwarf_gnu_debugaltlink returns 0 it means there was no
> .gnu_debugaltlink section at all. A negative return value means the
> data found was corrupt. In both cases neither altname nor build_id
> might be set up. So I added the following fixup:
>
> diff --git a/libdw/dwarf_getalt.c b/libdw/dwarf_getalt.c
> index 7b41a2b..3e5af15 100644
> --- a/libdw/dwarf_getalt.c
> +++ b/libdw/dwarf_getalt.c
> @@ -117,7 +117,7 @@ find_debug_altlink (Dwarf *dbg)
> &build
> _id);
>
> /* Couldn't even get the debugaltlink. It probably doesn't
> exist. */
> - if (build_id_len < 0)
> + if (build_id_len <= 0)
> return;
>
> const uint8_t *id = (const uint8_t *) build_id;
I pushed this patch to master with this small fixup.
Cheers,
Mark
prev parent reply other threads:[~2018-01-29 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 11:31 Mark Wielaard
2018-01-25 15:28 ` Mark Wielaard
2018-01-29 10:53 ` Mark Wielaard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517223220.32569.2.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).