From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 990841F8C6 for ; Sun, 1 Aug 2021 22:15:25 +0000 (UTC) Received: from localhost ([::1]:42250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAJjw-0002OB-97 for normalperson@yhbt.net; Sun, 01 Aug 2021 18:15:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAJjo-0002O1-7t for bug-gnulib@gnu.org; Sun, 01 Aug 2021 18:15:16 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAJjk-0001FF-1Y for bug-gnulib@gnu.org; Sun, 01 Aug 2021 18:15:15 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B460F16005D; Sun, 1 Aug 2021 15:15:01 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id q6R0SxZvM_wo; Sun, 1 Aug 2021 15:14:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C0F281600CC; Sun, 1 Aug 2021 15:14:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jCaRwXxqA-WX; Sun, 1 Aug 2021 15:14:58 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8CD8B16005D; Sun, 1 Aug 2021 15:14:58 -0700 (PDT) To: Jim Meyering References: From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: any pending fixes? preparing for diffutils release Message-ID: Date: Sun, 1 Aug 2021 15:14:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------B0F1DF4868926F5AC61F2C32" Content-Language: en-US Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.08, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gnulib bugs Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --------------B0F1DF4868926F5AC61F2C32 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable I've recently been improving some GCC-based static analysis in Gnulib,=20 and syncing from Gnulib to diffutils meant that you have a bit of a=20 work-in-progress there. I plan to make further such changes soon. The Gnulib work already installed is conservative and I see no harm in=20 releasing what we've got in diffutils now. I'm sending this email mainly=20 to give you a heads-up that more Gnulib changes are coming. FWIW attached are the diffutils patches I have so far. They assume the=20 abovementioned Gnulib work-in-progress and this should not be installed=20 in diffutils yet. Most likely more minor diffutils patches will be=20 needed once I've finished the Gnulib changes I have in mind. Until today I've been using the Gnulib work-in-progress on grep rather=20 than on diffutils. I've found one memory leak there and hope to find=20 more bugs - after all, that's the point of all this. I didn't find any=20 diffutils bugs in my brief run-through today. --------------B0F1DF4868926F5AC61F2C32 Content-Type: text/x-patch; charset=UTF-8; name="diffutils.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diffutils.diff" diff --git a/configure.ac b/configure.ac index 73adb80..b532d43 100644 --- a/configure.ac +++ b/configure.ac @@ -96,10 +96,6 @@ if test "$gl_gcc_warnings" =3D yes; then nw=3D"$nw -Wsuggest-attribute=3Dpure" nw=3D"$nw -Wduplicated-branches" # Too many false alarms =20 - # Avoid false alarm in lib/vasnprintf.c. - # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html - gl_WARN_ADD([-Wno-analyzer-null-argument]) - gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) AC_SUBST([GNULIB_WARN_CFLAGS]) fi diff --git a/src/diff.h b/src/diff.h index 27362c0..0849a55 100644 --- a/src/diff.h +++ b/src/diff.h @@ -355,7 +355,9 @@ extern void print_context_script (struct change *, bo= ol); extern int diff_dirs (struct comparison const *, int (*) (struct comparison const *, char const *, char const *)); -extern char *find_dir_file_pathname (char const *, char const *); +extern char *find_dir_file_pathname (char const *, char const *) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE + _GL_ATTRIBUTE_RETURNS_NONNULL; =20 /* ed.c */ extern void print_ed_script (struct change *); diff --git a/src/diff3.c b/src/diff3.c index 6be7e3c..1f656b6 100644 --- a/src/diff3.c +++ b/src/diff3.c @@ -16,6 +16,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see .= */ =0C +/* As of GCC 11.2.1, gcc -Wanalyzer-too-complex reports that this + program's code is too complicated for gcc -fanalyzer. + FIXME: Compile with -DANALYZER_NULL_DEFERENCE and see whether the + resulting diagnostics are false alarms. */ +#if 10 <=3D __GNUC__ && !ANALYZER_NULL_DEREFERENCE +# pragma GCC diagnostic ignored "-Wanalyzer-null-dereference" +#endif + #include "system.h" #include "paths.h" =20 --------------B0F1DF4868926F5AC61F2C32--