Bug 29407 - kscope fails self-check
Summary: kscope fails self-check
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 minor
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
: 29670 29671 (view as bug list)
Depends on:
Blocks: 29413
  Show dependency treegraph
 
Reported: 2022-07-25 21:47 UTC by Ben Woodard
Modified: 2024-09-30 18:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
output with errors (9.75 KB, application/x-gzip)
2022-07-25 21:47 UTC, Ben Woodard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woodard 2022-07-25 21:47:48 UTC
Created attachment 14232 [details]
output with errors

$ fedabipkgdiff --self-compare -a --from fc36  arm-none-eabi-gcc-cs fails with a huge number of errors.

This is with the most latest trunk as of: 7513a91ff03148efebd5b68ff776b5ddd1e3af4f

The output is quite long and is not like anything that I've seen before. It seems to have a lot to do with virtual functions.
Comment 1 Ben Woodard 2022-07-27 02:22:51 UTC
This seems to be the best representative of a class of C++ bugs. I kind of feel like if you fix this one it will fix the other packages that I've listed below.

First note that there 12145 filtered functions and 198 variables that were filtered out. However, the thing that I'm kind of keying off of is all the changes to vtables.

Comparing the ABI of binaries between arm-none-eabi-gcc-cs-11.1.0-2.fc36.aarch64.rpm and arm-none-eabi-gcc-cs-11.1.0-2.fc36.aarch64.rpm:

======== comparing'cc1' to itself wrongly yielded result: ===========
  Functions changes summary: 0 Removed, 17 Changed (12145 filtered out), 0 Added functions
  Variables changes summary: 0 Removed, 0 Changed (198 filtered out), 0 Added variables

  17 functions with some indirect sub-type change:

    [C] 'function predicate add_condition(ipa_fn_summary*, ipa_node_params*, int, tree, agg_position_info*, tree_code, tree, expr_eval_ops)' at ipa-predicate.c:633:1 has some indirect sub-type changes:
      parameter 2 of type 'ipa_node_params*' has sub-type changes:
        in pointed to type 'class ipa_node_params' at ipa-prop.h:567:1:
          type size hasn't changed
          1 data member changes (4 filtered):
            type of 'ipcp_param_lattices* lattices' changed:
              in pointed to type 'class ipcp_param_lattices' at ipa-cp.c:337:1:
                type size hasn't changed
                1 data member changes (3 filtered):
                  type of 'ipcp_lattice<tree_node*> itself' changed:
                    type size hasn't changed
                    no data member change (1 filtered);

    [C] 'method virtual void ana::alloca_region::dump_to_pp(pretty_printer*, bool) const' at region.cc:1133:1 has some indirect sub-type changes:
      implicit parameter 0 of type 'const ana::alloca_region*' has sub-type changes:
        in pointed to type 'const ana::alloca_region':
          in unqualified underlying type 'class ana::alloca_region' at region.h:949:1:
            type size hasn't changed
            1 base class change:
              'class ana::region' at region.h:87:1 changed:
                type size hasn't changed
                15 member function insertions:
                  'method virtual void ana::region::accept(ana::visitor*) const' at region.cc:491:1, virtual at voffset 12/13    {_ZNK3ana6region6acceptEPNS_7visitorE}
                  'method virtual void ana::region::dump_to_pp(pretty_printer*, bool) const' at region.h:131:1, virtual at voffset 13/13
                  'method virtual const ana::cast_region* ana::region::dyn_cast_cast_region() const' at region.h:111:1, virtual at voffset 10/13    {_ZNK3ana6region20dyn_cast_cast_regionEv}
                  'method virtual const ana::decl_region* ana::region::dyn_cast_decl_region() const' at region.h:103:1, virtual at voffset 6/13    {_ZNK3ana6region20dyn_cast_decl_regionEv}
                  'method virtual const ana::element_region* ana::region::dyn_cast_element_region() const' at region.h:107:1, virtual at voffset 8/13    {_ZNK3ana6region23dyn_cast_element_regionEv}
                  'method virtual const ana::field_region* ana::region::dyn_cast_field_region() const' at region.h:105:1, virtual at voffset 7/13    {_ZNK3ana6region21dyn_cast_field_regionEv}
                  'method virtual const ana::frame_region* ana::region::dyn_cast_frame_region() const' at region.h:97:1, virtual at voffset 3/13    {_ZNK3ana6region21dyn_cast_frame_regionEv}
                  'method virtual const ana::function_region* ana::region::dyn_cast_function_region() const' at region.h:99:1, virtual at voffset 4/13    {_ZNK3ana6region24dyn_cast_function_regionEv}
                  'method virtual const ana::offset_region* ana::region::dyn_cast_offset_region() const' at region.h:109:1, virtual at voffset 9/13    {_ZNK3ana6region22dyn_cast_offset_regionEv}
                  'method virtual const ana::string_region* ana::region::dyn_cast_string_region() const' at region.h:113:1, virtual at voffset 11/13    {_ZNK3ana6region22dyn_cast_string_regionEv}
                  'method virtual const ana::symbolic_region* ana::region::dyn_cast_symbolic_region() const' at region.h:101:1, virtual at voffset 5/13    {_ZNK3ana6region24dyn_cast_symbolic_regionEv}
                  'method virtual ana::region_kind ana::region::get_kind() const' at region.h:95:1, virtual at voffset 2/13
                  'method virtual ana::region::~region(int)' at region.cc:71:1    {_ZN3ana6regionD0Ev}
                  'method virtual ana::region::~region(int)' at region.cc:71:1    {_ZN3ana6regionD2Ev}
                  'method virtual ana::region::~region(int)' at region.cc:71:1
                1 member function changes (14 filtered):
                  'method virtual const ana::frame_region* ana::region::dyn_cast_frame_region() const' has some sub-type changes:
                    return type changed:
                      in pointed to type 'const ana::frame_region':
                        in unqualified underlying type 'class ana::frame_region' at region.h:204:1:
                          type size hasn't changed
                          no base class change (1 filtered);
                          7 member function insertions:
                            'method virtual void ana::frame_region::accept(ana::visitor*) const' at region.cc:677:1, virtual at voffset 12/13    {_ZNK3ana12frame_region6acceptEPNS_7visitorE}
                            'method virtual void ana::frame_region::dump_to_pp(pretty_printer*, bool) const' at region.cc:687:1, virtual at voffset 13/13    {_ZNK3ana12frame_region10dump_to_ppEP14pretty_printerb}
                            'method virtual const ana::frame_region* ana::frame_region::dyn_cast_frame_region() const' at region.h:252:1, virtual at voffset 3/13    {_ZNK3ana12frame_region21dyn_cast_frame_regionEv}
                            'method virtual ana::region_kind ana::frame_region::get_kind() const' at region.h:251:1, virtual at voffset 2/13    {_ZNK3ana12frame_region8get_kindEv}
                            'method virtual ana::frame_region::~frame_region(int)' at region.cc:668:1    {_ZN3ana12frame_regionD0Ev}
                            'method virtual ana::frame_region::~frame_region(int)' at region.cc:668:1    {_ZN3ana12frame_regionD2Ev}
                            'method virtual ana::frame_region::~frame_region(int)' at region.cc:668:1
                          1 member function changes (6 filtered):
                            'method virtual void ana::frame_region::accept(ana::visitor*) const' has some sub-type changes:
                              parameter 1 of type 'ana::visitor*' has sub-type changes:
                                in pointed to type 'class ana::visitor' at region-model.h:156:1:
                                  type size hasn't changed
                                  15 member function insertions:
                                    'method virtual void ana::visitor::visit_binop_svalue(const ana::binop_svalue*)' at region-model.h:166:1, virtual at voffset 7/14    {_ZN3ana7visitor18visit_binop_svalueEPKNS_12binop_svalueE

Other packages which seem to have similar problems are:

kdepim-addons
kf5-libktorrent
kf5-mailcommon
iaito
kscope
lammps
Comment 2 Ben Woodard 2022-10-14 16:31:22 UTC
The problem with the self compare with arm-none-eabi-gcc-cs fails self-check seems to have been resolved with 2.1 but now there is an assert:

abipkgdiff: ../../../libabigail/src/abg-ir-priv.h:687: void abigail::ir::environment::priv::pop_composite_type_comparison_operands(const abigail::ir::type_base*, const abigail::ir::type_base*): Assertion `__abg_cond__' failed.

This assertion also appears in:
arm-none-eabi-gcc-cs-c++
gcc
kdelibs
llvm13
llvm14
llvm

This is covered in https://sourceware.org/bugzilla/show_bug.cgi?id=29672 so I'm changing the title but leaving this bug open.

However kdepim-addons continues to have a library error:

Comparing the ABI of binaries between kdepim-addons-22.08.1-1.fc37.aarch64.rpm and kdepim-addons-22.08.1-1.fc37.aarch64.rpm:

==== SELF CHECK SUCCEEDED for 'libadblocklibprivate.so.5.21.1' ====
==== SELF CHECK SUCCEEDED for 'libkaddressbookmergelibprivate.so.5.21.1' ====
==== SELF CHECK SUCCEEDED for 'libfolderconfiguresettings.so.5.21.1' ====
==== SELF CHECK SUCCEEDED for 'libkmaillanguagetool.so.5.21.1' ====
======== comparing'libkmailconfirmbeforedeleting.so.5.21.1' to itself wrongly yielded result: ===========
  Functions changes summary: 0 Removed, 1 Changed, 0 Added function
  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

  1 function with some indirect sub-type change:

    [C] 'method virtual int ConfirmBeforeDeletingMessageBoxDialog::qt_metacall(QMetaObject::Call, int, void**)' at moc_confirmbeforedeletingcreateruledialog.cpp:89:1 has some indirect sub-type changes:
      Please note that the symbol of this function is _ZN37ConfirmBeforeDeletingMessageBoxDialog11qt_metacallEN11QMetaObject4CallEiPPv
     and it aliases symbol: _ZN27ConfirmBeforeDeletingDialog11qt_metacallEN11QMetaObject4CallEiPPv
      'method virtual int ConfirmBeforeDeletingMessageBoxDialog::qt_metacall(QMetaObject::Call, int, void**) {_ZN37ConfirmBeforeDeletingMessageBoxDialog11qt_metacallEN11QMetaObject4CallEiPPv, _ZN27ConfirmBeforeDeletingDialog11qt_metacallEN11QMetaObject4CallEiPPv}' now becomes 'method virtual int ConfirmBeforeDeletingCreateRuleDialog::qt_metacall(QMetaObject::Call, int, void**) {_ZN37ConfirmBeforeDeletingMessageBoxDialog11qt_metacallEN11QMetaObject4CallEiPPv, _ZN27ConfirmBeforeDeletingDialog11qt_metacallEN11QMetaObject4CallEiPPv}'
      implicit parameter 0 of type 'ConfirmBeforeDeletingMessageBoxDialog*' changed:
        in pointed to type 'class ConfirmBeforeDeletingMessageBoxDialog' at confirmbeforedeletingcreateruledialog.h:12:1:
          type name changed from 'ConfirmBeforeDeletingMessageBoxDialog' to 'ConfirmBeforeDeletingCreateRuleDialog'
          type size hasn't changed
          6 member function deletions:
            'method virtual const QMetaObject* ConfirmBeforeDeletingMessageBoxDialog::metaObject() const' at moc_confirmbeforedeletingmessageboxdialog.cpp:76:1, virtual at voffset 0/2    {_ZNK37ConfirmBeforeDeletingMessageBoxDialog10metaObjectEv}
            'method virtual int ConfirmBeforeDeletingMessageBoxDialog::qt_metacall(QMetaObject::Call, int, void**)' at moc_confirmbeforedeletingmessageboxdialog.cpp:89:1, virtual at voffset 2/2    {_ZN37ConfirmBeforeDeletingMessageBoxDialog11qt_metacallEN11QMetaObject4CallEiPPv}
            'method virtual void* ConfirmBeforeDeletingMessageBoxDialog::qt_metacast(const char*)' at moc_confirmbeforedeletingmessageboxdialog.cpp:81:1, virtual at voffset 1/2    {_ZN37ConfirmBeforeDeletingMessageBoxDialog11qt_metacastEPKc}
            'method virtual ConfirmBeforeDeletingMessageBoxDialog::~ConfirmBeforeDeletingMessageBoxDialog(int)' at confirmbeforedeletingmessageboxdialog.h:16:1
            'method virtual ConfirmBeforeDeletingMessageBoxDialog::~ConfirmBeforeDeletingMessageBoxDialog(int)' at confirmbeforedeletingmessageboxdialog.h:16:1    {_ZN37ConfirmBeforeDeletingMessageBoxDialogD1Ev}
            'method virtual ConfirmBeforeDeletingMessageBoxDialog::~ConfirmBeforeDeletingMessageBoxDialog(int)' at confirmbeforedeletingmessageboxdialog.h:16:1
          6 member function insertions:
            'method virtual const QMetaObject* ConfirmBeforeDeletingCreateRuleDialog::metaObject() const' at moc_confirmbeforedeletingcreateruledialog.cpp:76:1, virtual at voffset 0/2
            'method virtual int ConfirmBeforeDeletingCreateRuleDialog::qt_metacall(QMetaObject::Call, int, void**)' at moc_confirmbeforedeletingcreateruledialog.cpp:89:1, virtual at voffset 2/2    {_ZN37ConfirmBeforeDeletingMessageBoxDialog11qt_metacallEN11QMetaObject4CallEiPPv}
            'method virtual void* ConfirmBeforeDeletingCreateRuleDialog::qt_metacast(const char*)' at moc_confirmbeforedeletingcreateruledialog.cpp:81:1, virtual at voffset 1/2
            'method virtual ConfirmBeforeDeletingCreateRuleDialog::~ConfirmBeforeDeletingCreateRuleDialog(int)' at confirmbeforedeletingcreateruledialog.h:17:1
            'method virtual ConfirmBeforeDeletingCreateRuleDialog::~ConfirmBeforeDeletingCreateRuleDialog(int)' at confirmbeforedeletingcreateruledialog.h:17:1
            'method virtual ConfirmBeforeDeletingCreateRuleDialog::~ConfirmBeforeDeletingCreateRuleDialog(int)' at confirmbeforedeletingcreateruledialog.h:17:1
          1 data member change:
            type of 'ConfirmBeforeDeletingMessageBoxWidget* const mConfirmBeforeDeletingWidget' changed:
              'ConfirmBeforeDeletingMessageBoxWidget* const' changed to 'ConfirmBeforeDeletingCreateRuleWidget* const'
            and name of 'ConfirmBeforeDeletingMessageBoxDialog::mConfirmBeforeDeletingWidget' changed to 'ConfirmBeforeDeletingCreateRuleDialog::mConfirmBeforeDeletingCreateRuleWidget' at confirmbeforedeletingcreateruledialog.h:24:1

===SELF CHECK FAILED for 'libkmailconfirmbeforedeleting.so.5.21.1'

----------
As does kf5-libktorrent

Comparing the ABI of binaries between kf5-libktorrent-22.08.1-1.fc37.i686.rpm and kf5-libktorrent-22.08.1-1.fc37.i686.rpm:

======== comparing'libKF5Torrent.so.22.08.1' to itself wrongly yielded result: ===========
  Functions changes summary: 0 Removed, 1 Changed, 0 Added function
  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

  1 function with some indirect sub-type change:

    [C] 'method virtual int dht::Node::qt_metacall(QMetaObject::Call, int, void**)' at moc_serverinterface.cpp:89:1 has some indirect sub-type changes:
      Please note that the symbol of this function is _ZN2bt15ServerInterface11qt_metacallEN11QMetaObject4CallEiPPv
     and it aliases symbols: _ZN2bt20TorrentFileInterface11qt_metacallEN11QMetaObject4CallEiPPv, _ZN3utp10Connection11qt_metacallEN11QMetaObject4CallEiPPv
      'method virtual int dht::Node::qt_metacall(QMetaObject::Call, int, void**) {_ZN2bt15ServerInterface11qt_metacallEN11QMetaObject4CallEiPPv, _ZN2bt20TorrentFileInterface11qt_metacallEN11QMetaObject4CallEiPPv, _ZN3utp10Connection11qt_metacallEN11QMetaObject4CallEiPPv}' now becomes 'method virtual int bt::ServerInterface::qt_metacall(QMetaObject::Call, int, void**) {_ZN2bt15ServerInterface11qt_metacallEN11QMetaObject4CallEiPPv, _ZN2bt20TorrentFileInterface11qt_metacallEN11QMetaObject4CallEiPPv, _ZN3utp10Connection11qt_metacallEN11QMetaObject4CallEiPPv}'
      implicit parameter 0 of type 'dht::Node*' changed:
        in pointed to type 'class dht::Node' at serverinterface.h:24:1:
          type name changed from 'dht::Node' to 'bt::ServerInterface'
          type size changed from 320 to 64 (in bits)
          6 member function deletions:
            'method virtual const QMetaObject* dht::Node::metaObject() const' at moc_node.cpp:76:1, virtual at voffset 0/2
            'method virtual int dht::Node::qt_metacall(QMetaObject::Call, int, void**)' at moc_node.cpp:89:1, virtual at voffset 2/2    {_ZN2bt15ServerInterface11qt_metacallEN11QMetaObject4CallEiPPv}
            'method virtual void* dht::Node::qt_metacast(const char*)' at moc_node.cpp:81:1, virtual at voffset 1/2
            'method virtual dht::Node::~Node(int)' at node.h:39:1
            'method virtual dht::Node::~Node(int)' at node.h:39:1
            'method virtual dht::Node::~Node(int)' at node.h:39:1
          5 member function insertions:
            'method virtual bool bt::ServerInterface::changePort(bt::Uint16)' at serverinterface.h:35:1, virtual at voffset 12/12
            'method virtual const QMetaObject* bt::ServerInterface::metaObject() const' at moc_serverinterface.cpp:76:1, virtual at voffset 0/12    {_ZNK2bt15ServerInterface10metaObjectEv}
            'method virtual int bt::ServerInterface::qt_metacall(QMetaObject::Call, int, void**)' at moc_serverinterface.cpp:89:1, virtual at voffset 2/12    {_ZN2bt15ServerInterface11qt_metacallEN11QMetaObject4CallEiPPv}
            'method virtual void* bt::ServerInterface::qt_metacast(const char*)' at moc_serverinterface.cpp:81:1, virtual at voffset 1/12    {_ZN2bt15ServerInterface11qt_metacastEPKc}
            'method virtual bt::ServerInterface::~ServerInterface(int)' at serverinterface.h:29:1
          3 data member deletions:
            'dht::Node::Private* d', at offset 64 (in bits) at node.h:86:1
            'dht::Key our_id', at offset 96 (in bits) at node.h:87:1
            'bt::Uint32 num_entries', at offset 288 (in bits) at node.h:88:1

===SELF CHECK FAILED for 'libKF5Torrent.so.22.08.1'

Comparing the ABI of binaries between kf5-libktorrent-22.08.1-1.fc37.ppc64le.rpm and kf5-libktorrent-22.08.1-1.fc37.ppc64le.rpm:

-----------

Similarly this also continues to affects:
kf5-mailcommon
kscope
lammps

The one upside is that iaiato seems to be fixed.
Comment 3 Ben Woodard 2022-10-14 16:48:44 UTC
*** Bug 29671 has been marked as a duplicate of this bug. ***
Comment 4 Ben Woodard 2022-10-14 16:52:06 UTC
*** Bug 29670 has been marked as a duplicate of this bug. ***
Comment 5 Ben Woodard 2022-10-14 18:29:04 UTC
While testing of libabigail 2.1 against Fedora 37 is not yet done, this appears to be the most important bug that is currently affecting libabigail 2.1. It affects a lot of important packages several of which have lots of libraries which are frequently used. Of the packages that I listed below probably the most important one is lammps*.

kdepim-addons - lib, lots of virtual methods
credentials-fetcher - app, lots of virtual methods
kf5-messagelib
kf5-libktorrent
kf5-mailcommon
kf5-messagelib
kscope
lammps
lammps-mpich
lammps-openmpi
vsomeip3
smesh
freefem++
qt-mobility-location
Comment 6 Ben Woodard 2023-03-23 22:32:55 UTC
freefem++
vsomeip3
kdepim-addons
qt-mobility-location
credentials-fetcher
lammps
kf5-messagelib

no longer have a problem. This may have been the same as smesh which was recently fixed.

However kscope continues to have a problem:

Comparing the ABI of binaries between kscope-1.9.4-37.20170716git98db2b4.fc37.s390x.rpm and kscope-1.9.4-37.20170716git98db2b4.fc37.s390x.rpm:

==== SELF CHECK SUCCEEDED for 'kscopeapp' ====
======== comparing'libkscope_editor.so.1.0.0' to itself wrongly yielded result: ===========
  Functions changes summary: 0 Removed, 1 Changed (3 filtered out), 0 Added functions
  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

  1 function with some indirect sub-type change:

    [C] 'method virtual const QMetaObject* KScope::Editor::Config::metaObject() const' at moc_config.cpp:76:1 has some indirect sub-type changes:
      implicit parameter 0 of type 'const KScope::Editor::Config*' has sub-type changes:
        in pointed to type 'const KScope::Editor::Config':
          in unqualified underlying type 'class KScope::Editor::Config' at config.h:45:1:
            type size hasn't changed
            6 member function insertions:
              'method virtual const QMetaObject* KScope::Editor::Config::metaObject() const' at moc_config.cpp:76:1, virtual at voffset 0/2    {_ZNK6KScope6Editor6Config10metaObjectEv}
              'method virtual int KScope::Editor::Config::qt_metacall(QMetaObject::Call, int, void**)' at moc_config.cpp:89:1, virtual at voffset 2/2    {_ZN6KScope6Editor6Config11qt_metacallEN11QMetaObject4CallEiPPv}
              'method virtual void* KScope::Editor::Config::qt_metacast(const char*)' at moc_config.cpp:81:1, virtual at voffset 1/2    {_ZN6KScope6Editor6Config11qt_metacastEPKc}
              'method virtual KScope::Editor::Config::~Config(int)' at config.h:51:1
              'method virtual KScope::Editor::Config::~Config(int)' at config.h:51:1    {_ZN6KScope6Editor6ConfigD1Ev}
              'method virtual KScope::Editor::Config::~Config(int)' at config.h:51:1
            no member function changes (6 filtered);
            1 data member change:
              type of 'struct {QList<KScope::Editor::Config::<unnamed struct>::Pair> map_;} lexerMap_' changed:
                type size hasn't changed
                1 data member deletion:
                  'QList<KScope::Editor::Config::<unnamed struct>::Pair> map_', at offset 0 (in bits) at config.h:141:1
Comment 7 Ben Woodard 2023-03-23 22:37:34 UTC
Those results are in relation to: 

commit a8a4ca8862959e9fede1b4878469681b8fadeb74 (HEAD -> master, origin/master,
origin/HEAD)
Author: Dodji Seketeli <dodji@redhat.com>
Date:   Wed Mar 22 15:42:43 2023 +0100

    abipkgdiff: Fix a typo

            * tools/abipkgdiff.cc (compare_to_self): Fix a typo.

    Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Comment 8 Ben Woodard 2023-05-18 19:11:33 UTC
This still happens with kscope from F38 with the latest trunk as of:

commit 06e8d54d0404ccf2a103804ec568797822152b69 (HEAD -> master, origin/master, origin/HEAD)
Author: Dodji Seketeli <dodji@redhat.com>
Date:   Wed May 17 13:44:58 2023 +0200

    Bug 29693 - clang-libs from f37 fails self test
Comment 9 Dodji Seketeli 2024-09-30 18:12:03 UTC
This is fixed by commit https://sourceware.org/git/?p=libabigail.git;a=commit;h=3f4f94fd73abfd18de5da52cc575f1990b057b11 in the mainline.  The fix should be available in libabigail 2.6.

Thanks for reporting this problem.