Bug 27012 - segv in __aarch64_ldadd4_acq_rel
Summary: segv in __aarch64_ldadd4_acq_rel
Status: RESOLVED WORKSFORME
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks: 27019
  Show dependency treegraph
 
Reported: 2020-12-04 04:36 UTC by Ben Woodard
Modified: 2021-06-10 20:56 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woodard 2020-12-04 04:36:52 UTC
This is with /lib64/libHalf.so.24.0.0 ilmbase-2.3.0-5.fc33.aarch64 as of commit 4f8c9b17 note this is on aarch64 not x86_64

Reading symbols from abidw...
Starting program: /home/ben/Shared/Work/test/libabigail-aarch64/bin/abidw --abidiff /lib64/libHalf.so.24.0.0

Program received signal SIGSEGV, Segmentation fault.
0x0000fffff7f26914 in __aarch64_ldadd4_acq_rel () from /home/ben/Shared/Work/test/libabigail-aarch64/lib/libabigail.so.0
#0  0x0000fffff7f26914 in __aarch64_ldadd4_acq_rel () from /home/ben/Shared/Work/test/libabigail-aarch64/lib/libabigail.so.0
#1  0x0000fffff7dd4e54 in __gnu_cxx::__atomic_add (__val=1, __mem=0xfffff7d787ec <virtual thunk to abigail::ir::type_decl::~type_decl()+8>) at /usr/include/c++/10/ext/atomicity.h:55
#2  __gnu_cxx::__atomic_add_dispatch (__val=1, __mem=0xfffff7d787ec <virtual thunk to abigail::ir::type_decl::~type_decl()+8>) at /usr/include/c++/10/ext/atomicity.h:96
#3  std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy (this=0xfffff7d787e4 <virtual thunk to abigail::ir::type_decl::~type_decl()>) at /usr/include/c++/10/bits/shared_ptr_base.h:142
#4  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= (__r=..., this=<synthetic pointer>) at /usr/include/c++/10/bits/shared_ptr_base.h:750
#5  std::__shared_ptr<abigail::ir::elf_symbol, (__gnu_cxx::_Lock_policy)2>::operator= (this=<synthetic pointer>) at /usr/include/c++/10/bits/shared_ptr_base.h:1182
#6  std::shared_ptr<abigail::ir::elf_symbol>::operator= (this=<synthetic pointer>) at /usr/include/c++/10/bits/shared_ptr.h:358
#7  abigail::ir::corpus::priv::build_unreferenced_symbols_tables (this=0x492d30) at ../../../libabigail/src/abg-corpus.cc:357
#8  0x0000fffff7dd5008 in abigail::ir::corpus::get_unreferenced_function_symbols (this=0x4ac550) at ../../../libabigail/src/abg-corpus.cc:1423
#9  0x0000fffff7e136a8 in abigail::comparison::compute_diff (f=std::shared_ptr<abigail::ir::corpus> (use count 3, weak count 0) = {...}, s=std::shared_ptr<abigail::ir::corpus> (use count 3, weak count 0) = {...}, ctxt=std::shared_ptr<abigail::comparison::diff_context> (use count 2, weak count 1) = {...}) at /usr/include/c++/10/bits/shared_ptr_base.h:1324
#10 0x0000000000404a74 in load_corpus_and_write_abixml (opts=..., context=std::shared_ptr<abigail::dwarf_reader::read_context> (empty) = {...}, env=std::shared_ptr<abigail::ir::environment> (use count 1, weak count 0) = {...}, argv=0xffffffffe9e8) at ../../../libabigail/tools/abidw.cc:590
#11 main (argc=<optimized out>, argv=0xffffffffe9e8) at ../../../libabigail/tools/abidw.cc:866
Comment 1 Ben Woodard 2020-12-04 18:17:30 UTC
Note that this problem does not show up when running on x86_64 while examining the aarch64 ELF files.
Comment 2 Ben Woodard 2020-12-04 18:36:20 UTC
The converse test seems to fail in the same way. So while using x86_64 to examine aarch64 ELF files works just fine. Using aarch64 to examine both aarch64 and x86_64 versions of the same library fails.

In other words on x86_64:

$ for i in testfiles/*/*;do echo $i; abidw --abidiff $i;done
testfiles/aarch64/libHalf.so.24.0.0
testfiles/aarch64/libicutest.so.67.1
testfiles/aarch64/libraw.so.20.0.0
testfiles/aarch64/libtbb.so.2
testfiles/x86_64/libHalf.so.24.0.0
testfiles/x86_64/libicutest.so.67.1
testfiles/x86_64/libraw.so.20.0.0
testfiles/x86_64/libtbb.so.2

but on aarch64:

for i in testfiles/*/*;do echo $i;abidw --abidiff $i;done
testfiles/aarch64/libHalf.so.24.0.0
Segmentation fault (core dumped)
testfiles/aarch64/libicutest.so.67.1
abidw: ../../../libabigail/src/abg-comparison.cc:9004: void abigail::comparison::corpus_diff::priv::ensure_lookup_tables_populated(): Assertion `__abg_cond__' failed.
Aborted (core dumped)
testfiles/aarch64/libraw.so.20.0.0
Segmentation fault (core dumped)
testfiles/aarch64/libtbb.so.2
abidw: ../../../libabigail/src/abg-reader.cc:1287: abigail::ir::type_base_sptr abigail::xml_reader::read_context::build_or_get_type_decl(const string&, bool): Assertion `__abg_cond__' failed.
Aborted (core dumped)
testfiles/x86_64/libHalf.so.24.0.0
Segmentation fault (core dumped)
testfiles/x86_64/libicutest.so.67.1
abidw: ../../../libabigail/src/abg-comparison.cc:9004: void abigail::comparison::corpus_diff::priv::ensure_lookup_tables_populated(): Assertion `__abg_cond__' failed.
Aborted (core dumped)
testfiles/x86_64/libraw.so.20.0.0
Segmentation fault (core dumped)
testfiles/x86_64/libtbb.so.2
abidw: ../../../libabigail/src/abg-reader.cc:1287: abigail::ir::type_base_sptr abigail::xml_reader::read_context::build_or_get_type_decl(const string&, bool): Assertion `__abg_cond__' failed.
Aborted (core dumped)
Comment 3 Ben Woodard 2021-06-10 20:56:22 UTC
This appears to be resolved in the current trunk.