From: Mark Wielaard <mark@klomp.org>
To: libabigail@sourceware.org
Subject: Re: Buildbot failure in Wildebeest Builder on whole buildset
Date: Tue, 27 Oct 2020 14:12:37 +0100 [thread overview]
Message-ID: <55435f4245c90de7b3e68997aaa085d12765ea7b.camel@klomp.org> (raw)
In-Reply-To: <23c2d7d59403327398ec4885150334e7902c1526.camel@klomp.org>
[-- Attachment #1: Type: text/plain, Size: 4469 bytes --]
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: <unknown>
> > Blamelist: Mark Wielaard <mark@klomp.org>
> >
> > 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=<optimized out>, 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 = {<abigail::ir::type_base> = {<abigail::ir::type_or_decl_base> = {<abigail::ir::ir_traversable_base> = {<abigail::ir::traversable_base> = {_vptr.traversable_base = 0x3ff972f5f40 <vtable for abigail::ir::array_type_def::subrange_type+304>,
> priv_ = std::shared_ptr<abigail::ir::traversable_base::priv> (use count 1, weak count 0) = {get() = 0x125c290}}, <No data fields>}, priv_ = std::shared_ptr<abigail::ir::type_or_decl_base::priv> (use count 1, weak count 0) = {
> get() = 0x125c160}}, _vptr.type_base = 0x3ff972f5ec8 <vtable for abigail::ir::array_type_def::subrange_type+184>, priv_ = 0x125c2f0}, <abigail::ir::decl_base> = {
> _vptr.decl_base = 0x3ff972f5fd0 <vtable for abigail::ir::array_type_def::subrange_type+448>, priv_ = 0x125c330}, _vptr.subrange_type = 0x3ff972f5e38 <vtable for abigail::ir::array_type_def::subrange_type+40>,
> priv_ = std::shared_ptr<abigail::ir::array_type_def::subrange_type::priv> (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<abigail::ir::type_base> (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
[-- Attachment #2: 0001-Assume-subrange-bounds-types-are-unsigned-if-no-unde.patch --]
[-- Type: text/x-patch, Size: 1490 bytes --]
From d7253e475b6d04445d62ae5b55c03facbd6ab87d Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Tue, 27 Oct 2020 14:06:03 +0100
Subject: [PATCH] Assume subrange bounds types are unsigned if no underlying
type is given.
When running abidiff on test34-libjemalloc.so.2-intel-16.0.3 it would
crash in array_type_def::subrange_type::get_length on the ABG_ASSERT
get_upper_bound() >= get_lower_bound(). This was because that file
contained a subrange upper_bound value encoded with data1 or data2
without an underlying type. In that case we assumed the value was
encoded as a signed value which caused some of the upper bounds to
be negative (while the lower bound, which wasn't given, was assumed
to be zero).
* src/abg-dwarf-reader.cc (build_subrange_type): Default
is_signed to false.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
src/abg-dwarf-reader.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index aa1bb2b5..7a2b7ae0 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -14666,7 +14666,7 @@ build_subrange_type(read_context& ctxt,
Dwarf_Die underlying_type_die;
type_base_sptr underlying_type;
/* Unless there is an underlying type which says differently. */
- bool is_signed = true;
+ bool is_signed = false;
if (die_die_attribute(die, DW_AT_type, underlying_type_die))
underlying_type =
is_type(build_ir_node_from_die(ctxt,
--
2.18.4
next prev parent reply other threads:[~2020-10-27 13:12 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 9:47 buildbot
2020-10-27 11:30 ` Mark Wielaard
2020-10-27 13:12 ` Mark Wielaard [this message]
2020-10-28 9:30 ` Dodji Seketeli
2020-10-28 10:12 ` Mark Wielaard
-- strict thread matches above, loose matches on Subject: below --
2022-01-17 13:19 buildbot
2021-12-21 19:18 buildbot
2021-12-14 15:55 buildbot
2021-12-15 13:01 ` Mark Wielaard
2021-11-29 8:05 buildbot
2021-11-29 11:23 ` Mark Wielaard
2021-10-27 11:11 buildbot
2021-10-27 11:14 ` Mark Wielaard
2021-10-27 12:04 ` Dodji Seketeli
2021-10-18 10:58 buildbot
2021-09-23 12:12 buildbot
2021-09-23 12:19 ` Mark Wielaard
2021-08-11 17:08 buildbot
2021-07-16 10:11 buildbot
2021-07-16 10:33 ` Mark Wielaard
2021-04-12 15:48 buildbot
2021-03-18 16:05 buildbot
2021-03-19 23:03 ` Mark Wielaard
2020-12-02 15:32 buildbot
2020-11-27 16:59 buildbot
2020-11-25 12:52 buildbot
2020-11-25 8:51 buildbot
2020-11-12 10:50 buildbot
2020-11-02 17:21 buildbot
2020-10-14 10:31 buildbot
2020-10-09 9:35 buildbot
2020-07-30 15:29 buildbot
2020-07-30 15:38 ` Mark Wielaard
2020-07-28 14:40 buildbot
2020-07-28 14:41 ` Mark Wielaard
2020-05-04 9:36 buildbot
2020-04-23 13:09 buildbot
2020-04-23 13:32 ` Mark Wielaard
2020-03-26 15:47 buildbot
2020-03-19 10:55 buildbot
2020-03-19 12:25 ` Mark Wielaard
2020-03-20 22:23 ` Dodji Seketeli
2020-03-12 13:41 buildbot
2020-01-01 0:00 buildbot
2020-01-01 0:00 ` Mark Wielaard
2020-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Dodji Seketeli
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Matthias Maennich via libabigail
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Matthias Maennich via libabigail
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Dodji Seketeli
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Dodji Seketeli
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Dodji Seketeli
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 buildbot
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Dodji Seketeli
2018-01-01 0:00 buildbot
2018-01-01 0:00 ` Mark Wielaard
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=55435f4245c90de7b3e68997aaa085d12765ea7b.camel@klomp.org \
--to=mark@klomp.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).