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 369D2387086F for ; Sun, 10 May 2020 19:57:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 369D2387086F 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 librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id A01BE300B2FD; Sun, 10 May 2020 21:57:47 +0200 (CEST) Received: by librem (Postfix, from userid 1000) id 36C72C031D; Sun, 10 May 2020 21:57:22 +0200 (CEST) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: David Malcolm Subject: Some more GCC10 -fanalyzer inspired patches Date: Sun, 10 May 2020 21:53:33 +0200 Message-Id: <20200510195339.37191-1-mark@klomp.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.8 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: Sun, 10 May 2020 19:57:50 -0000 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. [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 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. Cheers, Mark