Hi, On Tue, 2020-10-27 at 12:30 +0100, Mark Wielaard wrote: > The Buildbot has detected a failed build on builder > > whole buildset while building libabigail. > > Full details are available at: > > https://builder.wildebeest.org/buildbot/#builders/9/builds/535 > > > > Buildbot URL: https://builder.wildebeest.org/buildbot/ > > > > Worker for this Build: fedora-s390x > > > > Build Reason: > > Blamelist: Mark Wielaard > > > > BUILD FAILED: failed test (failure) > > This fails make distcheck with: > > ERROR: files left in build directory after distclean: > ./tests/core.2971518 > make[2]: *** [Makefile:859: distcleancheck] Error 1 > > Oddly no check fails. But there is another core file present in the > make check directory. > > Inspecting that core file provides the following backtrace: > > #0 0x000003ff965c9026 in raise () from /lib64/libc.so.6 > #1 0x000003ff965ab162 in abort () from /lib64/libc.so.6 > #2 0x000003ff965c0af0 in __assert_fail_base () from /lib64/libc.so.6 > #3 0x000003ff965c0b6e in __assert_fail () from /lib64/libc.so.6 > #4 0x000003ff9706c3e6 in > abigail::ir::array_type_def::subrange_type::get_length > (this=0x125c220) at abg-ir.cc:14558 > #5 abigail::ir::array_type_def::subrange_type::get_length > (this=0x125c220) at abg-ir.cc:14558 > [...] > #36 main (argc=, argv=0x3ffecf7e948) at > abidiff.cc:1241 > > So that is here: > > 14557 uint64_t > 14558 array_type_def::subrange_type::get_length() const > 14559 { > 14560 if (is_infinite()) > 14561 return 0; > 14562 > (gdb) > 14563 ABG_ASSERT(get_upper_bound() >= get_lower_bound()); > 14564 return get_upper_bound() - get_lower_bound() + 1; > 14565 } > > With > > (gdb) print this > $1 = (const abigail::ir::array_type_def::subrange_type * const) 0x125c220 > (gdb) print *this > $2 = { = { = { = { = {_vptr.traversable_base = 0x3ff972f5f40 , > priv_ = std::shared_ptr (use count 1, weak count 0) = {get() = 0x125c290}}, }, priv_ = std::shared_ptr (use count 1, weak count 0) = { > get() = 0x125c160}}, _vptr.type_base = 0x3ff972f5ec8 , priv_ = 0x125c2f0}, = { > _vptr.decl_base = 0x3ff972f5fd0 , priv_ = 0x125c330}, _vptr.subrange_type = 0x3ff972f5e38 , > priv_ = std::shared_ptr (use count 1, weak count 0) = {get() = 0x125c3c0}} > (gdb) print *this.priv_ > $3 = {lower_bound_ = {s_ = abigail::ir::array_type_def::subrange_type::bound_value::UNSIGNED_SIGNEDNESS, v_ = {unsigned_ = 0, signed_ = 0}}, upper_bound_ = {s_ = abigail::ir::array_type_def::subrange_type::bound_value::SIGNED_SIGNEDNESS, v_ = { > unsigned_ = 18446744073709551559, signed_ = -57}}, underlying_type_ = std::weak_ptr (empty) = {get() = 0x0}, language_ = abigail::ir::translation_unit::LANG_C11, infinite_ = false} > > Looking through the main argv this must be: > abidiff --no-default-suppression --no-linkage-name --no-show-locs --no-redundant /home/mjw/bb/wildebeest/libabigail-fedora-s390x/build/libabigail-1.8/_build/sub/../../tests/data/test-diff-filter/test34-libjemalloc.so.2-gcc-6.1.0 /home/mjw/bb/wildebeest/libabigail-fedora-s390x/build/libabigail-1.8/_build/sub/../../tests/data/test-diff-filter/test34-libjemalloc.so.2-intel-16.0.3 I could replicate this locally with ulimit -c unlimited Then make check or the above invocation of abidiff caused a crash that produced a core file. The testcase doesn't FAIL however! I don't yet know why a crash still makes the test PASS. The reason is because test34-libjemalloc.so.2-intel-16.0.3 contains subranges without a type that use data1 or data2 forms for the upper_bound. If no underlying type is given for the subrange then we default to assuming the value is signed. Flipping that assumption to unsigned, as done in the attached patch, makes everything work again, no more crashes/core dumps. Cheers, Mark