public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "gprocida+abigail at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/27598] New: abidiff mishandles union member functions
Date: Wed, 17 Mar 2021 21:59:00 +0000	[thread overview]
Message-ID: <bug-27598-9487@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27598

            Bug ID: 27598
           Summary: abidiff mishandles union member functions
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: gprocida+abigail at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

I was originally investigating "harmless union" changes when I managed to crash
abidiff when adding member functions to unions.

SEGV #1

$ head ?.cc
==> 1.cc <==
union S {
  void bar() const { }
  int needed;
};
void fun(S s) { s.bar(); }

==> 2.cc <==
union S {
  void bar() const { }
};
void fun(S s) { s.bar(); }
$ for x in ?.cc; do g++ -Wall -Wextra -g -c $x; done
$ abidiff ?.o
Functions changes summary: 0 Removed, 2 Changed, 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

2 functions with some indirect sub-type change:

  [C] 'method void S::bar() const' at 2.cc:2:1 has some indirect sub-type
changes:
Segmentation fault

SEGV #2

$ head ?.cc
==> 1.cc <==
union S {
  void bar() const { }
  int needed;
};
void fun(S s) { s.bar(); }

==> 2.cc <==
struct S {
  void bar() const { }
};
void fun(S s) { s.bar(); }
$ for x in ?.cc; do g++ -Wall -Wextra -g -c $x; done
$ abidiff ?.o
Functions changes summary: 0 Removed, 2 Changed, 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

2 functions with some indirect sub-type change:

  [C] 'method void S::bar() const' at 2.cc:2:1 has some indirect sub-type
changes:
Segmentation fault

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-03-17 21:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 21:59 gprocida+abigail at google dot com [this message]
2021-03-30 10:57 ` [Bug default/27598] " dodji at redhat dot com
2021-04-06 10:51 ` dodji at redhat dot com

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=bug-27598-9487@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@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).