public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "hexiaole1994 at 126 dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/29829] New: abidiff coredump at abg-dwarf-reader.cc when read libxul.so
Date: Sat, 26 Nov 2022 03:43:21 +0000	[thread overview]
Message-ID: <bug-29829-9487@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29829
           Summary: abidiff coredump at abg-dwarf-reader.cc when read
                    libxul.so
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: hexiaole1994 at 126 dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

[Overview]
Executing 'abidiff' against to centos7.6's 'libxul.so.debug' will cause
coredump, the output from 'bt' command of 'gdb' shows below:

/* command begin */
# abidiff libxul.so.debug libxul.so.debug
abidiff: abg-dwarf-reader.cc:14628: abigail::ir::function_type_sptr
abigail::dwarf_reader::build_function_type(abigail::dwarf_reader::read_context&,
Dwarf_Die*, abigail::ir::class_or_union_sptr, size_t): Assertion `__abg_cond__'
failed.
Aborted (core dumped)
# gdb -c core abidiff
(gdb) bt
#0  0x0000fffdcc4d63d0 in raise () from /usr/lib64/libc.so.6
#1  0x0000fffdcc4d777c in abort () from /usr/lib64/libc.so.6
#2  0x0000fffdcc4cf940 in ?? () from /usr/lib64/libc.so.6
#3  0x0000fffdcc4cf9bc in __assert_fail () from /usr/lib64/libc.so.6
#4  0x0000fffdccde5358 in abigail::dwarf_reader::build_function_type (ctxt=...,
die=die@entry=0xffffe5874a38, is_method=std::shared_ptr (empty) 0x0,
where_offset=137951670,
    where_offset@entry=187657105818480) at abg-dwarf-reader.cc:14628
#5  0x0000fffdccdda294 in abigail::dwarf_reader::build_ir_node_from_die
(ctxt=..., die=die@entry=0xffffe5874a38, scope=0xaaadc4f57760,
    called_from_public_decl=called_from_public_decl@entry=true,
where_offset=187657105818480, where_offset@entry=137951670,
is_declaration_only=false, is_declaration_only@entry=true,
    is_required_decl_spec=is_required_decl_spec@entry=false) at
abg-dwarf-reader.cc:16413
...
#140 abigail::dwarf_reader::read_debug_info_into_corpus (ctxt=...) at
abg-dwarf-reader.cc:15878
#141 0x0000fffdccdedb34 in abigail::dwarf_reader::read_corpus_from_elf
(ctxt=..., status=@0xffffe588a798: abigail::elf_reader::STATUS_UNKNOWN) at
abg-dwarf-reader.cc:17012
#142 0x0000aaabfac261cc in main (argc=<optimized out>, argv=0xffffe588ac48) at
abidiff.cc:1207
/* command end */

The two arguments of 'abidiff' are same thing, the centos7.6's
'libxul.so.debug'. The reason to executing 'abidiff' in this way is all for
reproducing problem in more clear way, expressing this problem is only caused
by reading dwarf from centos7.6's 'libxul.so.debug'.

[Steps to Reproduce]
(1)download 'thunderbird' binary rpm that contains 'libxul.so.debug' from
centos7.6 website:
http://debuginfo.centos.org/7/x86_64/thunderbird-debuginfo-52.9.1-1.el7.centos.x86_64.rpm
(2)unpack 'thunderbird' binary rpm to get the 'libxul.so.debug'
rpm2cpio thunderbird-debuginfo-52.9.1-1.el7.centos.x86_64.rpm | cpio -idum
(3)create symbolic link to 'libxul.so.debug' for handy access:
ln -s usr/lib/debug/usr/lib64/thunderbird/libxul.so.debug .
(4)executing 'abidiff' to reproducing problem:
abidiff libxul.so.debug libxul.so.debug

[Actual Results]
'abidiff' crashes with coredump:

/* crash output begin */
abidiff: abg-dwarf-reader.cc:14628: abigail::ir::function_type_sptr
abigail::dwarf_reader::build_function_type(abigail::dwarf_reader::read_context&,
Dwarf_Die*, abigail::ir::class_or_union_sptr, size_t): Assertion `__abg_cond__'
failed.
Aborted (core dumped)
/* crash output end */

[Expected Results]
'abidiff' finishes normally without any message, because the 2 compared dynamic
libraries are same.

[Additional Information]
the libabigail version that reproduding against:
git repo: git://sourceware.org/git/libabigail.git
branch: master
HEAD commit: 7bd69830520f2e7ce4efb989b5fd23fde316c7c1(Make Front Ends first
class citizens)

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

             reply	other threads:[~2022-11-26  3:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26  3:43 hexiaole1994 at 126 dot com [this message]
2022-11-28 16:29 ` [Bug default/29829] " dodji at redhat dot com
2022-11-29  1:01 ` hexiaole1994 at 126 dot com
2022-12-01 10:31 ` dodji at redhat dot com
2022-12-02  3:44 ` hexiaole1994 at 126 dot com
2022-12-02 16:19 ` dodji at redhat dot com
2022-12-02 23:46 ` hexiaole1994 at 126 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-29829-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).