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/29857] New: abidiff coredump at abg-ir.cc:hash_as_canonical_type_or_constant when read libgs.so from ghostscript
Date: Tue, 06 Dec 2022 09:36:37 +0000	[thread overview]
Message-ID: <bug-29857-9487@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29857
           Summary: abidiff coredump at
                    abg-ir.cc:hash_as_canonical_type_or_constant when read
                    libgs.so from ghostscript
           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 'libgs.so' with version of 9.07 and 9.52 will
cause coredump, the output from 'bt' command of 'gdb' shows below:

/* gdb output begin */
(gdb) bt
#0  0x0000fffe7e3666e0 in raise () from /lib64/libc.so.6
#1  0x0000fffe7e367a8c in abort () from /lib64/libc.so.6
#2  0x0000fffe7e35fb8c in ?? () from /lib64/libc.so.6
#3  0x0000fffe7e35fc0c in __assert_fail () from /lib64/libc.so.6
#4  0x0000fffe7eb67360 in abigail::ir::hash_as_canonical_type_or_constant
(t=0x26646788) at abg-ir.cc:25934
#5  abigail::ir::hash_type (t=0x26646788) at abg-ir.cc:25814
...
#231 0x0000fffe7ec1c140 in
abigail::comparison::default_reporter::diff_has_net_changes (this=<optimized
out>, d=0x2e1bbf90) at abg-default-reporter.cc:38
#232 0x0000fffe7ebc20fc in abigail::comparison::corpus_diff::has_net_changes
(this=0x2e1bbf90) at abg-comparison.cc:10679
#233 0x0000000000406174 in main (argc=<optimized out>, argv=<optimized out>) at
abidiff.cc:1411
/* gdb output end */

[Steps to Reproduce]
(1)confirm that we at the latest master branch
# git remote -v
origin  git://sourceware.org/git/libabigail.git (fetch)
origin  git://sourceware.org/git/libabigail.git (push)
# git branch
* master
# git log -5 --oneline
1f51b9e8 (HEAD -> master, tag: libabigail-2.2, origin/master, origin/HEAD) Bug
29829 - dwarf-reader: Allow DIEs to be in a lexical block
ac53e88b dwarf-reader: Make die_peel_{qual_ptr,typedef} always set peeled type
4bdaf30b dwarf-reader: Avoid duplicating member functions
d222b447 dwarf-reader: Leverage ODR & DWZ
754364d5 Fix spurious deleted/added virtual destructor change report
# ./configure
# make
(2)assure the newly compiled 'abidiff' is linked to the newly compiled
'libabigail.so'
# pwd
/root/tmp/libabigail-git
# ldd tools/.libs/abidiff
        ...
        libabigail.so.1 => /root/tmp/libabigail-git/src/.libs/libabigail.so.1
(0x0000fffc59b00000)
        ...
(3)download 'libgs.so' with version of 9.07 and 9.52
# mkdir ghostscript/ && cd ghostscript/
# wget
https://vault.centos.org/7.6.1810/os/x86_64/Packages/ghostscript-9.07-31.el7.x86_64.rpm
# wget
http://debuginfo.centos.org/7/x86_64/ghostscript-debuginfo-9.07-31.el7.x86_64.rpm
# wget
https://mirror.lzu.edu.cn/openeuler/openEuler-20.03-LTS-SP3/everything/x86_64/Packages/ghostscript-9.52-5.oe1.x86_64.rpm
# wget
https://mirror.lzu.edu.cn/openeuler/openEuler-20.03-LTS-SP3/debuginfo/x86_64/Packages/ghostscript-debuginfo-9.52-5.oe1.x86_64.rpm
# mkdir 9.07-with-debug/ 9.07-without-debug/ 9.52-with-debug/
9.52-without-debug/
# rpm2cpio ghostscript-9.07-31.el7.x86_64.rpm | cpio -idum -D
9.07-without-debug/
# rpm2cpio ghostscript-debuginfo-9.07-31.el7.x86_64.rpm | cpio -idum -D
9.07-with-debug/
# rpm2cpio ghostscript-9.52-5.oe1.x86_64.rpm | cpio -idum -D
9.52-without-debug/
# rpm2cpio ghostscript-debuginfo-9.52-5.oe1.x86_64.rpm | cpio -idum -D
9.52-with-debug/
# cd ../
(4)use newly compiled 'abidiff' to reproducing the problem that causes coredump
# ./tools/.libs/abidiff --d1 ghostscript/9.07-with-debug/usr/lib/debug/ --d2
ghostscript/9.52-with-debug/usr/lib/debug/
ghostscript/9.07-without-debug/usr/lib64/libgs.so.9.07
ghostscript/9.52-without-debug/usr/lib64/libgs.so.9.52

[Actual Results]
'abidiff' crashes with coredump:

/* crash output begin */
abidiff: abg-ir.cc:25934: size_t
abigail::ir::hash_as_canonical_type_or_constant(const abigail::ir::type_base*):
Assertion `__abg_cond__' failed.
Aborted (core dumped)
/* crash output end */

[Expected Results]
'abidiff' finishes normally with detail of abi differences.

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

             reply	other threads:[~2022-12-06  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  9:36 hexiaole1994 at 126 dot com [this message]
2022-12-09  3:46 ` [Bug default/29857] " hexiaole1994 at 126 dot com
2022-12-12 13:16 ` dodji at redhat dot com
2022-12-16  4:05 ` sam at gentoo dot org
2022-12-20  9:27 ` dodji at redhat dot com
2022-12-22  2:07 ` 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-29857-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).