public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Giuliano Procida <gprocida@google.com>
To: Giuliano Procida via Libabigail <libabigail@sourceware.org>
Cc: "Dodji Seketeli" <dodji@seketeli.org>,
	kernel-team@android.com, "Matthias Männich" <maennich@google.com>
Subject: Re: [PATCH v2 1/3] abg-dwarf-reader: create new corpus unconditionally
Date: Tue, 1 Jun 2021 08:38:54 +0100	[thread overview]
Message-ID: <CAGvU0HmOjCW2UPxv=r3ixQGCC8hg3y97BLG9DbcTCPjtVJfU7g@mail.gmail.com> (raw)
In-Reply-To: <20210527085305.1400592-2-gprocida@google.com>

I forgot to add: this addresses bug 27769.

On Thu, 27 May 2021, 09:53 Giuliano Procida, <gprocida@google.com> wrote:

> The DWARF reader appears to create a new corpus object only if one is
> not already present. However, the only case where there can be
> multiple corpora is when build_corpus_group_from_kernel_dist_under is
> called and this function clears down the reader context, including the
> current corpus, between reading ELF objects.
>
> So it's clearer to just create a fresh corpus object unconditionally
> in the DWARF reader.
>
>         * src/abg-dwarf-reader.cc (read_debug_info_into_corpus):
>         Create new corpus object unconditionally.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>
> ---
>  src/abg-dwarf-reader.cc | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
> index a06ca88f..135d33c3 100644
> --- a/src/abg-dwarf-reader.cc
> +++ b/src/abg-dwarf-reader.cc
> @@ -14243,14 +14243,7 @@ static corpus_sptr
>  read_debug_info_into_corpus(read_context& ctxt)
>  {
>    ctxt.clear_per_corpus_data();
> -
> -  if (!ctxt.current_corpus())
> -    {
> -      corpus_sptr corp (new corpus(ctxt.env(), ctxt.elf_path()));
> -      ctxt.current_corpus(corp);
> -      if (!ctxt.env())
> -       ctxt.env(corp->get_environment());
> -    }
> +  ctxt.current_corpus(std::make_shared<corpus>(ctxt.env(),
> ctxt.elf_path()));
>
>    // First set some mundane properties of the corpus gathered from
>    // ELF.
> --
> 2.31.1.818.g46aad6cb9e-goog
>
>

  reply	other threads:[~2021-06-01  7:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 11:28 [PATCH 0/3] always create fresh corpus objects Giuliano Procida
2021-04-27 11:28 ` [PATCH 1/3] abg-dwarf-reader: create new corpus unconditionally Giuliano Procida
2021-04-27 11:28 ` [PATCH 2/3] abg-reader: ensure corpus always has a symtab reader Giuliano Procida
2021-04-27 11:28 ` [PATCH 3/3] abg-reader: create a fresh corpus object per corpus Giuliano Procida
2021-06-10 16:54   ` Dodji Seketeli
2021-05-27  8:53 ` [PATCH v2 0/3] always create fresh corpus objects Giuliano Procida
2021-05-27  8:53   ` [PATCH v2 1/3] abg-dwarf-reader: create new corpus unconditionally Giuliano Procida
2021-06-01  7:38     ` Giuliano Procida [this message]
2021-06-10 15:58     ` [PATCH v2 1/3, applied] " Dodji Seketeli
2021-06-10 16:52     ` [PATCH v2 1/3] " Dodji Seketeli
2021-05-27  8:53   ` [PATCH v2 2/3] abg-reader: ensure corpus always has a symtab reader Giuliano Procida
2021-06-10 16:53     ` Dodji Seketeli
2021-05-27  8:53   ` [PATCH v2 3/3] abg-reader: create a fresh corpus object per corpus Giuliano Procida

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='CAGvU0HmOjCW2UPxv=r3ixQGCC8hg3y97BLG9DbcTCPjtVJfU7g@mail.gmail.com' \
    --to=gprocida@google.com \
    --cc=dodji@seketeli.org \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    /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).