public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/27661] New: The XML reader gives anonymous types non-empty linkage_name
@ 2021-03-29 15:10 gprocida+abigail at google dot com
  2021-03-29 15:34 ` [Bug default/27661] " gprocida+abigail at google dot com
  0 siblings, 1 reply; 2+ messages in thread
From: gprocida+abigail at google dot com @ 2021-03-29 15:10 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 27661
           Summary: The XML reader gives anonymous types non-empty
                    linkage_name
           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: ---

The title of the bug is just a statement of fact. Debugging shows that the
anonymous structs etc. get linkage names like "__anonymous_struct__".

With post-processed XML (so, not necessarily trustworthy), I've managed to
trigger an assertion related to this:

Line numbers are offset due some debugging statements.

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff798a537 in __GI_abort () at abort.c:79
#2  0x00007ffff798a40f in __assert_fail_base (fmt=0x7ffff7af3128 "%s%s%s:%u:
%s%sAssertion `%s' failed.\n%n", assertion=0x555555763465 "__abg_cond__",
file=0x555555763451 "../../src/abg-ir.cc", line=12554, function=<optimized
out>)
    at assert.c:92
#3  0x00007ffff7999662 in __GI___assert_fail
(assertion=assertion@entry=0x555555763465 "__abg_cond__",
file=file@entry=0x555555763451 "../../src/abg-ir.cc", line=line@entry=12554, 
    function=function@entry=0x555555763050 "static abigail::ir::type_base_sptr
abigail::ir::type_base::get_canonical_type_for(abigail::ir::type_base_sptr)")
at assert.c:101
#4  0x00005555555e9c88 in abigail::ir::type_base::get_canonical_type_for
(t=std::shared_ptr<class abigail::ir::type_base> (use count 11, weak count 1) =
{...}) at ../../src/abg-ir.cc:12554
#5  0x00005555555f0d98 in abigail::ir::canonicalize (t=std::shared_ptr<class
abigail::ir::type_base> (use count 11, weak count 1) = {...}) at
/usr/include/c++/10/bits/shared_ptr_base.h:736
#6  0x00005555556eb980 in
abigail::xml_reader::read_context::perform_late_type_canonicalizing
(this=0x5555558308e0) at /usr/include/c++/10/ext/atomicity.h:100
#7  0x00005555556d53e7 in abigail::xml_reader::read_corpus_from_input
(ctxt=...) at ../../src/abg-reader.cc:1977
#8  0x000055555559956f in main (argc=<optimized out>, argv=0x7fffffffd738) at
/usr/include/c++/10/bits/shared_ptr_base.h:1324

The assertion is:

  ABG_ASSERT(!class_or_union
             || !class_or_union->get_is_anonymous()
             || class_or_union->get_linkage_name().empty());

I'll see if I can reproduce this with a minimum of XML transformation.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug default/27661] The XML reader gives anonymous types non-empty linkage_name
  2021-03-29 15:10 [Bug default/27661] New: The XML reader gives anonymous types non-empty linkage_name gprocida+abigail at google dot com
@ 2021-03-29 15:34 ` gprocida+abigail at google dot com
  0 siblings, 0 replies; 2+ messages in thread
From: gprocida+abigail at google dot com @ 2021-03-29 15:34 UTC (permalink / raw)
  To: libabigail

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

--- Comment #1 from Giuliano Procida <gprocida+abigail at google dot com> ---
Created attachment 13336
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13336&action=edit
Compressed, reordered libandroid.so ABI from tests

The particular XML transformation that tickles the issue is reordering all type
and declaration elements into a single replacement abi-instr.

abidiff hits the assertion on the attached file.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-29 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 15:10 [Bug default/27661] New: The XML reader gives anonymous types non-empty linkage_name gprocida+abigail at google dot com
2021-03-29 15:34 ` [Bug default/27661] " gprocida+abigail at google dot com

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).