public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: Giuliano Procida via Libabigail <libabigail@sourceware.org>
Cc: Dodji Seketeli <dodji@redhat.com>,
	 Giuliano Procida <gprocida@google.com>,
	 maennich@google.com
Subject: Re: [PATCH 1/2] symtab-reader: Remove an over-agressive assertion
Date: Mon, 07 Feb 2022 17:49:00 +0100	[thread overview]
Message-ID: <875ypqmxkz.fsf@seketeli.org> (raw)
In-Reply-To: <CAGvU0HmCunPXkmWvvsKNfmby-o1xnra3_NMWkvUrWVPW4fmusg@mail.gmail.com> (Giuliano Procida via Libabigail's message of "Mon, 7 Feb 2022 15:33:33 +0000")

Giuliano Procida via Libabigail <libabigail@sourceware.org> a écrit:

> Hi.
>
> On Mon, 7 Feb 2022 at 11:10, Dodji Seketeli <dodji@redhat.com> wrote:
>>
>>
>> In symtab::load, the symtab reader walks the symbol table and records
>> each relation "symbol <-> address".
>> So, the relation "foo <-> address-of-foo" is going to be recorded.
>> The relation "foo.cfi <-> address-of-foo.cfi" is going to be recorded
>> as well.
>>
>> But then, because the symbol foo.cfi has a special meaning, in the
>> realm of "control flow integrity", the relation "foo.cfi <->
>> address-of-foo.cfi" (as well as all the *.cfi <-> address-of*.cfi
>> relations) is going to be recorded (again but) in a particular way by
>> calling symtab::add_alternative_address_lookups.
>>
>> The problem is that in, symtab::add_alternative_address_lookups there
>> is an assert that (wrongly) assumes that the relation foo.cfi <->
>> address-of-foo.cfi is being seen for the first time.  This is wrong
>> because the loop in symtab::load that records all the "symbol <->
>> address" relations has seen and recorded this foo.cfi <->
>> address-of-foo.cfi relation once already.
>>
>> This patch removes that assert so that the kernel referred to in the bug
>> report of PR26646, as mentioned in
>> https://sourceware.org/bugzilla/show_bug.cgi?id=26646#c5, can be
>> processed by abidw without crashing.
>>
>>         * src/abg-symtab-reader.cc
>>         (symtab::add_alternative_address_lookups): Remove over-aggressive
>>         assert.
>>
>> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
>
> Reviewed-by: Giuliano Procida <gprocida@google.com>
>
> I didn't see a better solution and you've written up a proper analysis
> in the commit message. Thanks!

Thanks!

Applied to master.

[...]

Cheers,

-- 
		Dodji


  reply	other threads:[~2022-02-07 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 11:04 Patch review request for Bug 2664 - unexpected declaration-only types Dodji Seketeli
2022-02-07 11:09 ` [PATCH 1/2] symtab-reader: Remove an over-agressive assertion Dodji Seketeli
2022-02-07 15:33   ` Giuliano Procida
2022-02-07 16:49     ` Dodji Seketeli [this message]
2022-02-07 11:11 ` [PATCH 2/2] Bug 26646 - unexpected declaration-only types Dodji Seketeli
     [not found]   ` <CAGvU0H=UV0FxvzqhQWRjU6F7_yRMxhEK5P_t3NKMAD02e55rpw@mail.gmail.com>
2022-02-08 10:27     ` Dodji Seketeli

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=875ypqmxkz.fsf@seketeli.org \
    --to=dodji@redhat.com \
    --cc=gprocida@google.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).