* any pending fixes? preparing for diffutils release
@ 2021-08-01 19:44 Jim Meyering
2021-08-01 22:14 ` Paul Eggert
2021-08-02 5:36 ` Paul Eggert
0 siblings, 2 replies; 5+ messages in thread
From: Jim Meyering @ 2021-08-01 19:44 UTC (permalink / raw)
To: bug-gnulib@gnu.org List
I am ready to release diffutils-3.8, but in order to get it to compile
warning-free with configure's --enable-gcc-warnings and GCC 11.2.1, I
had to push another -fanalyze-pacification patch to regex_internal.c,
just minutes ago. Given that this made diffutils pull in gnulib
changes since the snapshot of two weeks ago, I considered first
creating another snapshot. But nothing recent seems particularly
risky, so I'll probably go ahead with the release today. At worst,
I'll make another release in a week or two.
But first, does anyone have anything pending that I should be sure to include?
Thanks,
Jim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: any pending fixes? preparing for diffutils release
2021-08-01 19:44 any pending fixes? preparing for diffutils release Jim Meyering
@ 2021-08-01 22:14 ` Paul Eggert
2021-08-02 0:53 ` Jim Meyering
2021-08-02 5:36 ` Paul Eggert
1 sibling, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2021-08-01 22:14 UTC (permalink / raw)
To: Jim Meyering; +Cc: Gnulib bugs
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
I've recently been improving some GCC-based static analysis in Gnulib,
and syncing from Gnulib to diffutils meant that you have a bit of a
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
releasing what we've got in diffutils now. I'm sending this email mainly
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
abovementioned Gnulib work-in-progress and this should not be installed
in diffutils yet. Most likely more minor diffutils patches will be
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
than on diffutils. I've found one memory leak there and hope to find
more bugs - after all, that's the point of all this. I didn't find any
diffutils bugs in my brief run-through today.
[-- Attachment #2: diffutils.diff --]
[-- Type: text/x-patch, Size: 1893 bytes --]
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" = yes; then
nw="$nw -Wsuggest-attribute=pure"
nw="$nw -Wduplicated-branches" # Too many false alarms
- # 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 *, bool);
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;
/* 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 <http://www.gnu.org/licenses/>. */
\f
+/* 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 <= __GNUC__ && !ANALYZER_NULL_DEREFERENCE
+# pragma GCC diagnostic ignored "-Wanalyzer-null-dereference"
+#endif
+
#include "system.h"
#include "paths.h"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: any pending fixes? preparing for diffutils release
2021-08-01 22:14 ` Paul Eggert
@ 2021-08-02 0:53 ` Jim Meyering
0 siblings, 0 replies; 5+ messages in thread
From: Jim Meyering @ 2021-08-02 0:53 UTC (permalink / raw)
To: Paul Eggert; +Cc: Gnulib bugs
On Sun, Aug 1, 2021 at 3:15 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> I've recently been improving some GCC-based static analysis in Gnulib,
Welcome changes. Thanks!
> and syncing from Gnulib to diffutils meant that you have a bit of a
> work-in-progress there. I plan to make further such changes soon.
No problem, of course.
> The Gnulib work already installed is conservative and I see no harm in
> releasing what we've got in diffutils now. I'm sending this email mainly
> 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
> abovementioned Gnulib work-in-progress and this should not be installed
> in diffutils yet. Most likely more minor diffutils patches will be
> 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
> than on diffutils. I've found one memory leak there and hope to find
> more bugs - after all, that's the point of all this. I didn't find any
> diffutils bugs in my brief run-through today.
Good. Thanks again.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: any pending fixes? preparing for diffutils release
2021-08-01 19:44 any pending fixes? preparing for diffutils release Jim Meyering
2021-08-01 22:14 ` Paul Eggert
@ 2021-08-02 5:36 ` Paul Eggert
2021-08-02 5:48 ` Jim Meyering
1 sibling, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2021-08-02 5:36 UTC (permalink / raw)
To: Jim Meyering; +Cc: Gnulib bugs
One minor problem I just discovered with the now-released diffutils 3.8,
a problem that was caused by my recent Gnulib changes, is that building
diffutils on RHEL 8.4 results in diagnostics like the following:
In file included from dirname.c:25:
xalloc.h:133:3: warning: 'malloc (rpl_free)' attribute ignored on
functions declared 'inline' [-Wattributes]
133 | _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
| ^~~~~~~~~~~~~~~~~~~~~~~~
These diagnostics are annoying but otherwise harmless. I just now
installed a Gnulib patch to fix this, here:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=9b69ffb766a2f6c0a06ad4b71040209534fde094
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: any pending fixes? preparing for diffutils release
2021-08-02 5:36 ` Paul Eggert
@ 2021-08-02 5:48 ` Jim Meyering
0 siblings, 0 replies; 5+ messages in thread
From: Jim Meyering @ 2021-08-02 5:48 UTC (permalink / raw)
To: Paul Eggert; +Cc: Gnulib bugs
On Sun, Aug 1, 2021 at 10:36 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> One minor problem I just discovered with the now-released diffutils 3.8,
> a problem that was caused by my recent Gnulib changes, is that building
> diffutils on RHEL 8.4 results in diagnostics like the following:
>
> In file included from dirname.c:25:
> xalloc.h:133:3: warning: 'malloc (rpl_free)' attribute ignored on
> functions declared 'inline' [-Wattributes]
> 133 | _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
>
> These diagnostics are annoying but otherwise harmless. I just now
> installed a Gnulib patch to fix this, here:
>
> https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=9b69ffb766a2f6c0a06ad4b71040209534fde094
Thanks. I won't wait 2.5 years for the next release :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-02 5:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 19:44 any pending fixes? preparing for diffutils release Jim Meyering
2021-08-01 22:14 ` Paul Eggert
2021-08-02 0:53 ` Jim Meyering
2021-08-02 5:36 ` Paul Eggert
2021-08-02 5:48 ` Jim Meyering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).