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 7F6B53840C1A for ; Thu, 14 May 2020 12:44:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7F6B53840C1A 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 B488F3000F13; Thu, 14 May 2020 14:44:20 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id C61734028E92; Thu, 14 May 2020 14:44:19 +0200 (CEST) Message-ID: Subject: Re: Some more GCC10 -fanalyzer inspired patches From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: David Malcolm Date: Thu, 14 May 2020 14:44:19 +0200 In-Reply-To: <20200510195339.37191-1-mark@klomp.org> References: <20200510195339.37191-1-mark@klomp.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-8.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2020 12:44:23 -0000 On Sun, 2020-05-10 at 21:53 +0200, Mark Wielaard wrote: > I did another build with the final GCC10 and -fanalyzer. The > -Wanalyzer-use-of-uninitialized-value option was removed, which caused > a lot of false positives. Without those it was easier to identify some > real issues. I also tried -fanalyze together with -flto. This takes a > lot of memory (linking libdw.so uses > 12GB) but does allow -fanalyzer > to detect some cross-function issues. >=20 > [PATCH 1/7] libdwfl: Cleanup user_core resources on failure in > [PATCH 2/7] tests: Make sure to not call memcmp with NULL arguments. > [PATCH 3/7] libelf: Check __gelf_getehdr_rdlock call doesn't fail in > [PATCH 4/7] libelf: Check for NULL shdr in elf_strptr. > [PATCH 5/7] src: Check ebl_openbackend result before using ebl > [PATCH 6/7] libdwfl: Return failure from dwfl_standard_find_debuginfo > [PATCH 7/7] libcpu: Free unused new bitfield on error in i386_parse.y >=20 > I think they all are for real issues, although probably fairly hard > to trigger. All are somewhat trivial and I intent to check them in soon. I pushed all 7 patches to elfutils git master.