From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 4007B3858D37 for ; Tue, 27 Oct 2020 13:12:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4007B3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id BC86030278CD for ; Tue, 27 Oct 2020 14:12:37 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 7896B401EDBE; Tue, 27 Oct 2020 14:12:37 +0100 (CET) Message-ID: <55435f4245c90de7b3e68997aaa085d12765ea7b.camel@klomp.org> Subject: Re: Buildbot failure in Wildebeest Builder on whole buildset From: Mark Wielaard To: libabigail@sourceware.org Date: Tue, 27 Oct 2020 14:12:37 +0100 In-Reply-To: <23c2d7d59403327398ec4885150334e7902c1526.camel@klomp.org> References: <20201027094717.EE7B990EAEB@builder.wildebeest.org> <23c2d7d59403327398ec4885150334e7902c1526.camel@klomp.org> Content-Type: multipart/mixed; boundary="=-uPgyCwJ8COnvEZCmvgeh" X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 13:12:41 -0000 --=-uPgyCwJ8COnvEZCmvgeh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 > >=20 > > Buildbot URL: https://builder.wildebeest.org/buildbot/ > >=20 > > Worker for this Build: fedora-s390x > >=20 > > Build Reason: > > Blamelist: Mark Wielaard > >=20 > > BUILD FAILED: failed test (failure) >=20 > This fails make distcheck with: >=20 > ERROR: files left in build directory after distclean: > ./tests/core.2971518 > make[2]: *** [Makefile:859: distcleancheck] Error 1 >=20 > Oddly no check fails. But there is another core file present in the > make check directory. >=20 > Inspecting that core file provides the following backtrace: >=20 > #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=3D0x125c220) at abg-ir.cc:14558 > #5 abigail::ir::array_type_def::subrange_type::get_length > (this=3D0x125c220) at abg-ir.cc:14558 > [...] > #36 main (argc=3D, argv=3D0x3ffecf7e948) at > abidiff.cc:1241 >=20 > So that is here: >=20 > 14557 uint64_t > 14558 array_type_def::subrange_type::get_length() const > 14559 { > 14560 if (is_infinite()) > 14561 return 0; > 14562=09 > (gdb)=20 > 14563 ABG_ASSERT(get_upper_bound() >=3D get_lower_bound()); > 14564 return get_upper_bound() - get_lower_bound() + 1; > 14565 } >=20 > With >=20 > (gdb) print this > $1 =3D (const abigail::ir::array_type_def::subrange_type * const) 0x125c2= 20 > (gdb) print *this > $2 =3D { =3D { = =3D { =3D { =3D {_vptr.traversable_base =3D 0x3ff972f5f40 ,=20 > priv_ =3D std::shared_ptr = (use count 1, weak count 0) =3D {get() =3D 0x125c290}}, }, = priv_ =3D std::shared_ptr (use count = 1, weak count 0) =3D { > get() =3D 0x125c160}}, _vptr.type_base =3D 0x3ff972f5ec8 , priv_ =3D 0x125c2f0}, = =3D { > _vptr.decl_base =3D 0x3ff972f5fd0 , priv_ =3D 0x125c330}, _vptr.subrange_type =3D 0x3= ff972f5e38 ,=20 > priv_ =3D std::shared_ptr (use count 1, weak count 0) =3D {get() =3D 0x125c3c0}} > (gdb) print *this.priv_=20 > $3 =3D {lower_bound_ =3D {s_ =3D abigail::ir::array_type_def::subrange_ty= pe::bound_value::UNSIGNED_SIGNEDNESS, v_ =3D {unsigned_ =3D 0, signed_ =3D = 0}}, upper_bound_ =3D {s_ =3D abigail::ir::array_type_def::subrange_type::b= ound_value::SIGNED_SIGNEDNESS, v_ =3D { > unsigned_ =3D 18446744073709551559, signed_ =3D -57}}, underlying_t= ype_ =3D std::weak_ptr (empty) =3D {get() =3D 0x0},= language_ =3D abigail::ir::translation_unit::LANG_C11, infinite_ =3D false= } >=20 > Looking through the main argv this must be: > abidiff --no-default-suppression --no-linkage-name --no-show-locs --no-re= dundant /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 --=-uPgyCwJ8COnvEZCmvgeh Content-Disposition: inline; filename*0=0001-Assume-subrange-bounds-types-are-unsigned-if-no-unde.pat; filename*1=ch Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="0001-Assume-subrange-bounds-types-are-unsigned-if-no-unde.patch"; charset="UTF-8" RnJvbSBkNzI1M2U0NzViNmQwNDQ0NWQ2MmFlNWI1NWMwM2ZhY2JkNmFiODdkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJrIFdpZWxhYXJkIDxtYXJrQGtsb21wLm9yZz4KRGF0ZTog VHVlLCAyNyBPY3QgMjAyMCAxNDowNjowMyArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIEFzc3VtZSBz dWJyYW5nZSBib3VuZHMgdHlwZXMgYXJlIHVuc2lnbmVkIGlmIG5vIHVuZGVybHlpbmcKIHR5cGUg aXMgZ2l2ZW4uCgpXaGVuIHJ1bm5pbmcgYWJpZGlmZiBvbiB0ZXN0MzQtbGliamVtYWxsb2Muc28u Mi1pbnRlbC0xNi4wLjMgaXQgd291bGQKY3Jhc2ggaW4gYXJyYXlfdHlwZV9kZWY6OnN1YnJhbmdl X3R5cGU6OmdldF9sZW5ndGggb24gdGhlIEFCR19BU1NFUlQKZ2V0X3VwcGVyX2JvdW5kKCkgPj0g Z2V0X2xvd2VyX2JvdW5kKCkuIFRoaXMgd2FzIGJlY2F1c2UgdGhhdCBmaWxlCmNvbnRhaW5lZCBh IHN1YnJhbmdlIHVwcGVyX2JvdW5kIHZhbHVlIGVuY29kZWQgd2l0aCBkYXRhMSBvciBkYXRhMgp3 aXRob3V0IGFuIHVuZGVybHlpbmcgdHlwZS4gSW4gdGhhdCBjYXNlIHdlIGFzc3VtZWQgdGhlIHZh bHVlIHdhcwplbmNvZGVkIGFzIGEgc2lnbmVkIHZhbHVlIHdoaWNoIGNhdXNlZCBzb21lIG9mIHRo ZSB1cHBlciBib3VuZHMgdG8KYmUgbmVnYXRpdmUgKHdoaWxlIHRoZSBsb3dlciBib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