Message ID | 5f72e895306b8f742bd41d1020ad49e64aa5a958.camel@klomp.org |
---|---|
State | Committed |
Headers |
Return-Path: <elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8827F3858002 for <patchwork@sourceware.org>; Thu, 9 Dec 2021 14:23:34 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id C7EC43858016 for <elfutils-devel@sourceware.org>; Thu, 9 Dec 2021 14:23:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C7EC43858016 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id E77E43000ED0 for <elfutils-devel@sourceware.org>; Thu, 9 Dec 2021 15:23:25 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 0437E413CC9A; Thu, 9 Dec 2021 15:23:24 +0100 (CET) Message-ID: <5f72e895306b8f742bd41d1020ad49e64aa5a958.camel@klomp.org> Subject: right, trying --enable-sanitizer-address on armv7l From: Mark Wielaard <mark@klomp.org> To: elfutils-devel@sourceware.org Date: Thu, 09 Dec 2021 15:23:24 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-9.9 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list <elfutils-devel.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/elfutils-devel>, <mailto:elfutils-devel-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/elfutils-devel/> List-Help: <mailto:elfutils-devel-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/elfutils-devel>, <mailto:elfutils-devel-request@sourceware.org?subject=subscribe> Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" <elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
right, trying --enable-sanitizer-address on armv7l
|
|
Commit Message
Mark Wielaard
Dec. 9, 2021, 2:23 p.m. UTC
Hi, I was trying the new --enable-sanitizer-address on our armv7l buildbot worker and it almost works as is, except for... debuginfod.cxx:3472:12: runtime error: reference binding to misaligned address 0x00561ec9 for type '<unknown>', which requires 2 byte alignment 0x00561ec9: note: pointer points here 12 0a 00 2d e9 f0 4f 85 b0 00 af f8 60 df f8 bc e1 fe 44 f8 68 fa 68 00 2a 04 d0 00 f0 03 0c bc ^ And indeed removing 'right' here: << (sqlite3_column_text(ps_query, 1) ?: (const unsigned char*) "NULL") << endl; Makes everything PASS. But I don't understand why. It might be a bug in gcc/libasan (this is gcc 8.3.0 Debian 10.11 - Buster). I can try upgrading the machine to Debian 11 - Bullseye this weekend to see if that helps. Also, do we really want to right align the log here? We don't seem to align the log text anywhere else. Cheers, Mark
Comments
Hi, On Thu, 2021-12-09 at 15:23 +0100, Mark Wielaard wrote: > I was trying the new --enable-sanitizer-address on our armv7l > buildbot worker and it almost works as is, except for... I was confusing address sanitizer and the undefined sanitizer. It is the undefined sanitizer that produces the following runtime error. The new address sanitizer seems to work as expected. So I'll at least use --enable-sanitizer-address on the armv7l CI buildbot worker, but it would be nice to figure out why the undefined sanitizer is complaining about this usage of "right" and whether we really need it. > debuginfod.cxx:3472:12: runtime error: reference binding to misaligned > address 0x00561ec9 for type '<unknown>', which requires 2 byte > alignment > 0x00561ec9: note: pointer points here > 12 0a 00 2d e9 f0 4f 85 b0 00 af f8 60 df f8 bc e1 fe 44 f8 68 fa > 68 00 2a 04 d0 00 f0 03 0c bc > ^ > > And indeed removing 'right' here: > > diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx > index 35424e47..6fad331a 100644 > --- a/debuginfod/debuginfod.cxx > +++ b/debuginfod/debuginfod.cxx > @@ -3469,7 +3469,7 @@ database_stats_report() > throw sqlite_exception(rc, "step"); > > obatched(clog) > - << right << setw(20) << ((const char*) > sqlite3_column_text(ps_query, 0) ?: (const char*) "NULL") > + << setw(20) << ((const char*) sqlite3_column_text(ps_query, 0) > ?: (const char*) "NULL") > << " " > << (sqlite3_column_text(ps_query, 1) ?: (const unsigned char*) > "NULL") > << endl; > > Makes everything PASS. > > But I don't understand why. It might be a bug in gcc/libasan (this is > gcc 8.3.0 Debian 10.11 - Buster). I can try upgrading the machine to > Debian 11 - Bullseye this weekend to see if that helps. > > Also, do we really want to right align the log here? We don't seem to > align the log text anywhere else. > > Cheers, > > Mark
Hi - > I was trying the new --enable-sanitizer-address on our armv7l buildbot > worker and it almost works as is, except for... > > debuginfod.cxx:3472:12: runtime error: reference binding to misaligned > address 0x00561ec9 for type '<unknown>', which requires 2 byte > alignment > [...] > But I don't understand why. It might be a bug in gcc/libasan (this is > gcc 8.3.0 Debian 10.11 - Buster). [...] It must be a bug in gcc/libasan or something. > Also, do we really want to right align the log here? We don't seem to > align the log text anywhere else. This one just prettifies the messages because there is a sequence metrics & values being printed at startup, so it makes the numbers line up. But no great loss to drop; we export those as prometheus metrics too. - FChE
Hi Frank, On Thu, 2021-12-09 at 10:47 -0500, Frank Ch. Eigler via Elfutils-devel wrote: > > debuginfod.cxx:3472:12: runtime error: reference binding to > > misaligned > > address 0x00561ec9 for type '<unknown>', which requires 2 byte > > alignment > > [...] > > But I don't understand why. It might be a bug in gcc/libasan (this > > is > > gcc 8.3.0 Debian 10.11 - Buster). [...] > > It must be a bug in gcc/libasan or something. Yeah, I'll try to see if an gcc upgrade on the machine will help (but that has to wait a couple of days). > > Also, do we really want to right align the log here? We don't seem > > to > > align the log text anywhere else. > > This one just prettifies the messages because there is a sequence > metrics & values being printed at startup, so it makes the numbers > line up. But no great loss to drop; we export those as prometheus > metrics too. I am not proud of needing this workaround, but I did push the attached. Thanks, Mark
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 35424e47..6fad331a 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -3469,7 +3469,7 @@ database_stats_report() throw sqlite_exception(rc, "step"); obatched(clog) - << right << setw(20) << ((const char*) sqlite3_column_text(ps_query, 0) ?: (const char*) "NULL") + << setw(20) << ((const char*) sqlite3_column_text(ps_query, 0) ?: (const char*) "NULL") << " "