[PATCH] libasm: Fix GCC7 one -Wformat-truncation=2 warning.
Make sure that if we have really many labels the tempsym doesn't get truncated because it is too small to hold the whole name. This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed out by enabling this warning because there are currently some issues with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 Signed-off-by: Mark Wielaard --- libasm/ChangeLog| 6 +- libasm/asm_newsym.c | 6 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libasm/ChangeLog b/libasm/ChangeLog index fe06007..3f842f0 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,4 +1,8 @@ -2015-10-11 Akihiko Odaki +2017-02-12 Mark Wielaard + + * asm_newsym.c (asm_newsym): Increase TEMPSYMLEN to 13. + +2016-10-11 Akihiko Odaki * asm_align.c: Remove sys/param.h include. diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c index 332432a..5389166 100644 --- a/libasm/asm_newsym.c +++ b/libasm/asm_newsym.c @@ -1,5 +1,5 @@ /* Define new symbol for current position in given section. - Copyright (C) 2002, 2005, 2016 Red Hat, Inc. + Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -44,7 +44,9 @@ AsmSym_t * asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, int type, int binding) { -#define TEMPSYMLEN 10 +/* We don't really expect labels with many digits, but in theory it could + be 10 digits (plus ".L" and a zero terminator). */ +#define TEMPSYMLEN 13 char tempsym[TEMPSYMLEN]; AsmSym_t *result; -- 1.8.3.1
Re: [PATCH 1/4] Add missing tests to .gitignore
On Fri, 2017-02-10 at 15:18 +0100, Ulf Hermann wrote: > Some test binaries were missing and showed up in "git status". > > Signed-off-by: Ulf Hermann Thanks, applied. (Although, this is why I don't like srcdir == builddir builds, but it is supported). But note that your patch seemed to have been mangled. > --- > .gitignore | 12 > 1 file changed, 12 insertions(+) > > diff --git a/.gitignore b/.gitignore > index c583347..0ee3af7 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -93,6 +93,7 @@ Makefile.in > /tests/asm-tst9 > /tests/backtrace > /tests/backtrace-child > +/tests/backtrace-child-biarch There are double spaces at some of the lines, causing the patch not to apply as is. Cheers, Mark
Re: [PATCH 2/4] Make the backtrace-data test helper more robust
On Fri, 2017-02-10 at 15:19 +0100, Ulf Hermann wrote: > When unwinding by frame pointer the unwinder might ask for invalid > addresses. We don't have to fail the test in this case. In fact > any broken dwarf information can lead to requests for invalid > addresses, also without frame pointer unwinding. > > Signed-off-by: Ulf Hermann Thanks. This makes sense to me. Applied. Note the patch had the same issue as the previous one (lines starting with a space had the first space doubled). Cheers, Mark
Re: [PATCH 3/4] Optionally allow unknown symbols in the backtrace tests
On Fri, 2017-02-10 at 15:19 +0100, Ulf Hermann wrote: > This is useful to test unwinding without debug information. The > binaries being examined might still have frame pointers that allow > us to bridge the unknown symbols. > > Signed-off-by: Ulf Hermann Applied even though the new option is not yet used (I assume it will be in the next patch that mysteriously never made it to the mailinglist) and the ChangeLog isn't 100% according to spec. But I am in a good mood :) Thanks, Mark :) https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html
Re: [PATCH 3/4] Optionally allow unknown symbols in the backtrace tests
On Fri, 2017-02-10 at 17:50 +0100, Ulf Hermann wrote: > > Try sending suspicious content via something like fpaste.org. > > I don't think it's very suspicious, but I don't intend to start a pointless > argument as first thing I do here ;) > > fpaste.org won't accept it either, but paste.kde.org does. So, here we go: > > https://paste.kde.org/pgs6oqk2z I could reconstruct it from that pastebin. But it was a bit of a struggle, some parts didn't apply as is because tabs seemed to be turned into spaces. I tried to repost it to the list. But the first time it was bounced as "spam" and the second time after removing the git-bin-diffs sourceware seemed to accept it, but then it never showed up on the list. (See below for the logs on my end.) I have the patch and the binaries locally and you added the description how to recreate them, so that is good. make check passes. But make distcheck pointed out that run-backtrace-fp-core-x86_64.sh should be added to EXTRA_DIST. I haven't looked too deeply at the actual patch yet, sorry. But I think I like the idea. I'll be away for a day, but will get back to it soon. Lets see if we can somehow get it past the spam filters... Thanks, Mark Bounce from first attempt: Return-Path: Received: from tarox.wildebeest.org (herd.wildebeest.org [80.127.118.209]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 48FF73001559 for ; Sun, 12 Feb 2017 23:05:13 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 2C4EA406D9E4; Sun, 12 Feb 2017 23:05:13 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Subject: [PATCH] Add frame pointer unwinding as fallback on x86_64 Date: Sun, 12 Feb 2017 23:05:09 +0100 Message-Id: <1486937109-29423-1-git-send-email-m...@klomp.org> X-Mailer: git-send-email 1.8.3.1 postfix log for second attempt (with git-bin-diffs removed): Feb 13 00:21:51 gnu postfix/smtpd[7671]: CE7703000269: client=herd.wildebeest.org[80.127.118.209], sasl_method=DIGEST-MD5, sasl_username=mark Feb 13 00:21:51 gnu postfix/cleanup[7675]: CE7703000269: message-id=<1486941708-32567-1-git-send-email-m...@klomp.org> Feb 13 00:21:51 gnu postfix/qmgr[1823]: CE7703000269: from=, size=9253, nrcpt=1 (queue active) Feb 13 00:21:57 gnu postfix/smtp[7676]: CE7703000269: to=, relay=sourceware.org[209.132.180.131]:25, delay=5.9, delays=0.02/0.01/1.4/4.4, dsn=2.0.0, status=sent (250 Queued! 1486941717 qp 97183 <1486941708-32567-1-git-send-email-m...@klomp.org>) Feb 13 00:21:57 gnu postfix/qmgr[1823]: CE7703000269: removed