From e432619d11a11a2b547a79bc6fa8ceb83dbe6067 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 30 Aug 2020 17:08:23 +0200 Subject: [PATCH 1/8] tests: beware of sed portability issues Reported by David Laxer . https://lists.gnu.org/r/bug-bison/2020-08/msg00027.html * tests/output.at: Don't use + with sed. While at it, fix a quotation problem hidden by the use of '#'. --- tests/output.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/output.at b/tests/output.at index 60267c2d..5af1e914 100644 --- a/tests/output.at +++ b/tests/output.at @@ -759,7 +759,7 @@ AT_TEST([x1], ]) # Check the CPP guard and Doxyen comments. -AT_CHECK([sed -ne 's/#line [0-9]\+ "/#line "/p;/INCLUDED/p;/\\file/{p;n;p;}' out/include/ast/loc.hh], [], +AT_CHECK([[sed -ne 's/#line [0-9][0-9]* "/#line "/p;/INCLUDED/p;/\\file/{p;n;p;}' out/include/ast/loc.hh]], [], [[ ** \file bar/include/ast/loc.hh ** Define the x1::location class. #ifndef YY_YY_BAR_INCLUDE_AST_LOC_HH_INCLUDED @@ -771,7 +771,7 @@ AT_CHECK([sed -ne 's/#line [0-9]\+ "/#line "/p;/INCLUDED/p;/\\file/{p;n;p;}' out #endif // !YY_YY_BAR_INCLUDE_AST_LOC_HH_INCLUDED ]]) -AT_CHECK([sed -ne 's/^#line [0-9]\+ "/#line "/p;/INCLUDED/p;/\\file/{p;n;p;}' out/x1.hh], [], +AT_CHECK([[sed -ne 's/^#line [0-9][0-9]* "/#line "/p;/INCLUDED/p;/\\file/{p;n;p;}' out/x1.hh]], [], [[ ** \file bar/x1.hh ** Define the x1::parser class. #ifndef YY_YY_BAR_X1_HH_INCLUDED From 68e3e442f9cef1960979a7f3e6b7e929312fa6d4 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 30 Aug 2020 17:27:11 +0200 Subject: [PATCH 2/8] gnulib: update --- gnulib | 2 +- lib/.gitignore | 1 + m4/.gitignore | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gnulib b/gnulib index 37b6f129..175e0bc7 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 37b6f1294620be849f951dcb2f505207b435f88d +Subproject commit 175e0bc72808d564074c4adcc72aeadb74adfcc6 diff --git a/lib/.gitignore b/lib/.gitignore index 37ec5dec..337cdb74 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -340,6 +340,7 @@ /termios.in.h /textstyle.h /textstyle.in.h +/thread-optim.h /time.h /time.in.h /timespec.c diff --git a/m4/.gitignore b/m4/.gitignore index 9c84195a..57bb666a 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -128,6 +128,7 @@ /open.m4 /pathmax.m4 /perror.m4 +/pid_t.m4 /pipe2.m4 /po.m4 /posix_spawn.m4 From 3da17724ad5a789292dac5187ebb885d6ea4da04 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 30 Aug 2020 16:15:39 +0200 Subject: [PATCH 3/8] doc: updates * NEWS, TODO: here. --- NEWS | 20 ++++++++++++++++++-- TODO | 10 +++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index a5c59f0d..d5a816b4 100644 --- a/NEWS +++ b/NEWS @@ -2,9 +2,24 @@ GNU Bison NEWS * Noteworthy changes in release ?.? (????-??-??) [?] + This release of Bison fixes all known bugs reported for Bison in MITRE's + Common Vulnerabilities and Exposures (CVE) system. These vulnerabilities + are only about bison-the-program itself, not the generated code. + + Although these bugs are typically irrelevant to how Bison is used, they + are worth fixing if only to give users peace of mind. + + There is no known vulnerability in the generated parsers. + ** Bug fixes - Push parsers use YYMALLOC/YYFREE instead of direct calls to malloc/free. + Push parsers always use YYMALLOC/YYFREE (no direct calls to malloc/free). + + Portability issues of the test suite, and of bison itself. + + Some unlikely crashes found by fuzzing have been fixed. This is only + about bison itself, not the generated parsers. + * Noteworthy changes in release 3.7.1 (2020-08-02) [stable] @@ -560,7 +575,8 @@ GNU Bison NEWS \005) with incorrect styling. Fixes for similar issues with unexpectedly short lines (e.g., the file was changed between parsing and diagnosing). - Several unlikely crashes found by fuzzing have been fixed. + Some unlikely crashes found by fuzzing have been fixed. This is only + about bison itself, not the generated parsers. * Noteworthy changes in release 3.5.2 (2020-02-13) [stable] diff --git a/TODO b/TODO index b8b2befb..e9874678 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,12 @@ -* Bison 3.7 +* Soon +** gnulib +Bruno notes: + +> I haven't looked deeply, but it strikes me that gnulib/lib/bitset/array.c +> does not make use of the 'ffsl' function, nor or the 'integer_length_l' +> function. Maybe because in Bison, all bitsets are so dense that it does +> not give a performance advantage? + ** Cex *** Improve gnulib Don't do this (counterexample.c): From f7b642cff76d3b412fe3565b245f320fa205a4a0 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 5 Sep 2020 09:28:56 +0200 Subject: [PATCH 4/8] build: fix incorrect dependencies Commit af000bab111768a04021bf5ffa4bbe91d44e231c ("doc: work around Texinfo 6.7 bug"), published in 3.4.91, added a dependency on the "all" target. This is a super bad idea, since "make all" will run this target *before* "all", which builds bison. It turns out that this new dependency actually needed bison to be built. So all the regular process (i) build $(BUILT_SOURCES) and then (ii) build bison, was wrecked since some of the $(BUILT_SOURCES) depended on bison... It was "easy" to see in the logs of "make V=1" because we were building bison files (such as src/files.o) *before* displaying the banner for "all-recursive". With this fix, we finally get again the proper sequence: rm -f examples/c/reccalc/scan.stamp examples/c/reccalc/scan.stamp.tmp /opt/local/libexec/gnubin/mkdir -p examples/c/reccalc touch examples/c/reccalc/scan.stamp.tmp flex -oexamples/c/reccalc/scan.c --header=examples/c/reccalc/scan.h ./examples/c/reccalc/scan.l mv examples/c/reccalc/scan.stamp.tmp examples/c/reccalc/scan.stamp rm -f lib/fcntl.h-t lib/fcntl.h && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ... } > lib/fcntl.h-t && \ mv lib/fcntl.h-t lib/fcntl.h ... mv -f lib/alloca.h-t lib/alloca.h make all-recursive Reported by Mingli Yu . https://github.com/akimd/bison/issues/31 https://lists.gnu.org/r/bison-patches/2020-05/msg00055.html Reported by Claudio Calvelli . https://lists.gnu.org/r/bug-bison/2020-09/msg00001.html https://bugs.gentoo.org/716516 * doc/local.mk (all): Rename as... (all-local): this. So that we don't compete with BUILT_SOURCES. --- NEWS | 4 +++- doc/local.mk | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d5a816b4..52f4e3c2 100644 --- a/NEWS +++ b/NEWS @@ -13,9 +13,11 @@ GNU Bison NEWS ** Bug fixes + Fix concurrent build issues (introduced in Bison 3.5). + Push parsers always use YYMALLOC/YYFREE (no direct calls to malloc/free). - Portability issues of the test suite, and of bison itself. + Fix portability issues of the test suite, and of bison itself. Some unlikely crashes found by fuzzing have been fixed. This is only about bison itself, not the generated parsers. diff --git a/doc/local.mk b/doc/local.mk index ab5b7454..f5590015 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -57,7 +57,7 @@ MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI) # Fix Info's @code in @deftype # https://lists.gnu.org/archive/html/help-texinfo/2019-11/msg00004.html -all: $(srcdir)/$(%C%_bison).info.bak +all-local: $(srcdir)/$(%C%_bison).info.bak $(srcdir)/$(%C%_bison).info.bak: $(srcdir)/$(%C%_bison).info $(AM_V_GEN) $(PERL) -pi.bak -0777 \ -e 's{(^ --.*\n(?: {10}.*\n)*)}' \ From 2a4e9a358f29d125f757ce60221d5323bf54848e Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 5 Sep 2020 17:44:38 +0200 Subject: [PATCH 5/8] gnulib: update --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index 175e0bc7..a83f488b 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 175e0bc72808d564074c4adcc72aeadb74adfcc6 +Subproject commit a83f488ba4eb1ce8fd072bf087e87aca6ab1ee79 From 5e33dfe59dac4fcf33c8b3bd2ba5d46245bc3771 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 5 Sep 2020 17:59:56 +0200 Subject: [PATCH 6/8] build: disable syntax-check warning error_message_uppercase etc/bench.pl.in-419-static int yylex (@{[is_pure (@directive) ? "YYSTYPE *yylvalp" : "void"]}); * cfg.mk: here. --- cfg.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/cfg.mk b/cfg.mk index 2a1b0831..114aa814 100644 --- a/cfg.mk +++ b/cfg.mk @@ -156,6 +156,7 @@ exclude = \ $(call exclude, \ bindtextdomain=^lib/main.c$$ \ cast_of_argument_to_free=^src/muscle-tab.c$$ \ + error_message_uppercase=etc/bench.pl.in$$ \ po_check=^tests|(^po/POTFILES.in|.md)$$ \ preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \ program_name=^lib/main.c$$ \ From a0bc06b703850984456fa526bd53b5a5612c596e Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 5 Sep 2020 18:06:16 +0200 Subject: [PATCH 7/8] version 3.7.2 * NEWS: Record release date. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 52f4e3c2..2c4a6572 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ GNU Bison NEWS -* Noteworthy changes in release ?.? (????-??-??) [?] +* Noteworthy changes in release 3.7.2 (2020-09-05) [stable] This release of Bison fixes all known bugs reported for Bison in MITRE's Common Vulnerabilities and Exposures (CVE) system. These vulnerabilities From dcdd119f69e63a47baff20d3c33778f7ad08b348 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 5 Sep 2020 18:31:25 +0200 Subject: [PATCH 8/8] maint: post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. --- .prev-version | 2 +- NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.prev-version b/.prev-version index a76ccff2..0b2eb36f 100644 --- a/.prev-version +++ b/.prev-version @@ -1 +1 @@ -3.7.1 +3.7.2 diff --git a/NEWS b/NEWS index 2c4a6572..a10af6f7 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ GNU Bison NEWS +* Noteworthy changes in release ?.? (????-??-??) [?] + + * Noteworthy changes in release 3.7.2 (2020-09-05) [stable] This release of Bison fixes all known bugs reported for Bison in MITRE's