gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, master, updated. gawk-4.1.0-4894-gb1e6adfa


From: Arnold Robbins
Subject: [SCM] gawk branch, master, updated. gawk-4.1.0-4894-gb1e6adfa
Date: Thu, 25 Aug 2022 04:11:59 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  b1e6adfa41822004177822909079d8c89a80adf7 (commit)
      from  79c1b1526338396ac62261decb09842e14406794 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=b1e6adfa41822004177822909079d8c89a80adf7

commit b1e6adfa41822004177822909079d8c89a80adf7
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Thu Aug 25 11:11:30 2022 +0300

    Syntax errors are now fatal. Stop the fuzzers.

diff --git a/ChangeLog b/ChangeLog
index 15eedf9b..46286435 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-08-25         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * awkgram.y (yyerror): Exit at the end, to make syntax errors
+       immediately fatal. This prevents problems with fuzzer-generated
+       programs at the cost of not continuing to diagnose subsequent
+       problems. Oh well, too bad. Hooray for the fuzzers. Bleah.
+       * NEWS: Updated.
+
 2022-08-17         Arnold D. Robbins     <arnold@skeeve.com>
 
        * NEWS: Mention that VAX/VMS is no longer supported.
diff --git a/NEWS b/NEWS
index 20c9c885..745d02fe 100644
--- a/NEWS
+++ b/NEWS
@@ -17,56 +17,59 @@ Changes from 5.1.x to 5.2.0
 1. Infrastructure upgrades: Libtool 2.4.7.
 
 2. Numeric scalars now compare in the same way as C for the relational
-operators. Comparison order for sorting has not changed.  This only
-makes a difference when comparing Infinity and NaN values with
-regular numbers; it should not be noticeable most of the time.
+   operators. Comparison order for sorting has not changed.  This only
+   makes a difference when comparing Infinity and NaN values with
+   regular numbers; it should not be noticeable most of the time.
 
 3. If the AWK_HASH environment variable is set to "fnv1a" gawk will
-use the FNV1-A hash function for associative arrays.
+   use the FNV1-A hash function for associative arrays.
 
 4. The CMake infrastructure has been removed. In the five years it was in
-the tree, nobody used it, and it was not updated.
+   the tree, nobody used it, and it was not updated.
 
 5. There is now a new function, mkbool(), that creates Boolean-typed
-values.  These values *are* numbers, but they are also tagged as
-Boolean. This is mainly for use with data exchange to/from languages
-or environments that support real Boolean values. See the manual
-for details.
+   values.  These values *are* numbers, but they are also tagged as
+   Boolean. This is mainly for use with data exchange to/from languages
+   or environments that support real Boolean values. See the manual
+   for details.
 
 6. As BWK awk has supported interval expressions since 2019, they are
-now enabled even if --traditional is supplied. The -r/--re-interval option
-remains, but it does nothing.
+   now enabled even if --traditional is supplied. The -r/--re-interval option
+   remains, but it does nothing.
 
 7. The rwarray extension has two new functions, writeall() and readall(),
-for saving / restoring all of gawk's variables and arrays.
+   for saving / restoring all of gawk's variables and arrays.
 
 8. The new `gawkbug' script should be used for reporting bugs.
 
 9. The manual page (doc/gawk.1) has been considerably reduced in size.
-Wherever possible, details were replaced with references to the online
-copy of the manual.
+   Wherever possible, details were replaced with references to the online
+   copy of the manual.
 
 10. Gawk now supports Terence Kelly's "persistent malloc" (pma),
-allowing gawk to preserve its variables, arrays and user-defined
-functions between runs. THIS IS AN EXPERIMENTAL FEATURE!
-
-For more information, see the manual. A new pm-gawk.1 man page
-is included, as is a separate user manual that focuses on the feature.
+    allowing gawk to preserve its variables, arrays and user-defined
+    functions between runs. THIS IS AN EXPERIMENTAL FEATURE!
+   
+    For more information, see the manual. A new pm-gawk.1 man page
+    is included, as is a separate user manual that focuses on the feature.
 
 11. Support for OS/2 has been removed. It was not being actively
-maintained.
+    maintained.
 
 12. Similarly, support for DJGPP has been removed. It also was not
-being actively maintained.
+    being actively maintained.
 
 13. VAX/VMS is no longer supported, as it can no longer be tested.
-The files for it remain in the distribution but will be removed
-eventually.
+    The files for it remain in the distribution but will be removed
+    eventually.
 
 14. Some subtle issues with untyped array elements being passed to
-functions have been fixed.
+    functions have been fixed.
+
+15. Syntax errors are now immediately fatal. This prevents problems
+    with errors from fuzzers and other such things.
 
-15. There have been numerous minor code cleanups and bug fixes. See the
+16. There have been numerous minor code cleanups and bug fixes. See the
     ChangeLog for details.
 
 Changes from 5.1.1 to 5.1.x
@@ -75,7 +78,7 @@ Changes from 5.1.1 to 5.1.x
 1. Infrastructure upgrades: Automake 1.16.5, Texinfo 6.8.
 
 2. The rwarray extension now supports writing and reading GMP and
-    MPFR values. As a result, a bug in the API code was fixed.
+   MPFR values. As a result, a bug in the API code was fixed.
 
 Changes from 5.1.0 to 5.1.1
 ---------------------------
diff --git a/awkgram.c b/awkgram.c
index ed10b5c7..da9a08a2 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5130,6 +5130,8 @@ yyerror(const char *m, ...)
        err(false, "", buf, args);
        va_end(args);
        efree(buf);
+       /* we don't use fatal(), that changes the exit status to 2 */
+       exit(EXIT_FAILURE);
 }
 
 /* mk_program --- create a single list of instructions */
diff --git a/awkgram.y b/awkgram.y
index e2a3d21b..ef3720cb 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -2622,6 +2622,8 @@ yyerror(const char *m, ...)
        err(false, "", buf, args);
        va_end(args);
        efree(buf);
+       /* we don't use fatal(), that changes the exit status to 2 */
+       exit(EXIT_FAILURE);
 }
 
 /* mk_program --- create a single list of instructions */
diff --git a/doc/ChangeLog b/doc/ChangeLog
index e2b377e1..54e680c1 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2022-08-25         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * gawktexi.in (Bug definition): Add a note about fuzzers.
+
 2022-08-19         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawktexi.in: Further editing in the VMS bits. Add a note
diff --git a/doc/gawk.info b/doc/gawk.info
index e6698a83..e292f253 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -32151,6 +32151,20 @@ Here's the list:
 Those of You Who Are Unhappy' (http://www.skeeve.com/fork-my-code.html),
 by Arnold Robbins and Chet Ramey.
 
+                         A Note About Fuzzers
+
+   In recent years, people have been running "fuzzers" to generate
+invalid 'awk' programs in order to find and report (so-called) bugs in
+'gawk'.
+
+   In general, such reports are not of much practical use.  The programs
+they create are not realistic and the bugs found are generally from some
+kind of memory corruption that is fatal anyway.
+
+   So, if you want to run a fuzzer against 'gawk' and report the
+results, you may do so, but be aware that such reports don't carry the
+same weight as reports of real bugs do.
+
 
 File: gawk.info,  Node: Bug address,  Next: Usenet,  Prev: Bug definition,  
Up: Bugs
 
@@ -38780,6 +38794,7 @@ Index
                                                               (line  83)
 * sidebar, Rounding Modes and Conversion: Setting the rounding mode.
                                                               (line  66)
+* sidebar, A Note About Fuzzers:         Bug definition.      (line  70)
 * SIGHUP signal, for dynamic profiling:  Profiling.           (line 217)
 * SIGINT signal (MS-Windows):            Profiling.           (line 220)
 * signals, USR1/SIGUSR1, for profiling:  Profiling.           (line 194)
@@ -39802,43 +39817,43 @@ Node: VMS Running1287028
 Node: VMS GNV1291307
 Node: Bugs1292021
 Node: Bug definition1292933
-Node: Bug address1295869
-Node: Usenet1299388
-Node: Performance bugs1300577
-Node: Asking for help1303498
-Node: Maintainers1305465
-Node: Other Versions1306472
-Node: Installation summary1314742
-Node: Notes1316099
-Node: Compatibility Mode1316893
-Node: Additions1317675
-Node: Accessing The Source1318600
-Node: Adding Code1320037
-Node: New Ports1326852
-Node: Derived Files1331227
-Ref: Derived Files-Footnote-11336887
-Ref: Derived Files-Footnote-21336922
-Ref: Derived Files-Footnote-31337520
-Node: Future Extensions1337634
-Node: Implementation Limitations1338292
-Node: Extension Design1339502
-Node: Old Extension Problems1340646
-Ref: Old Extension Problems-Footnote-11342164
-Node: Extension New Mechanism Goals1342221
-Ref: Extension New Mechanism Goals-Footnote-11345585
-Node: Extension Other Design Decisions1345774
-Node: Extension Future Growth1347887
-Node: Notes summary1348493
-Node: Basic Concepts1349651
-Node: Basic High Level1350332
-Ref: figure-general-flow1350614
-Ref: figure-process-flow1351300
-Ref: Basic High Level-Footnote-11354602
-Node: Basic Data Typing1354787
-Node: Glossary1358115
-Node: Copying1390002
-Node: GNU Free Documentation License1427545
-Node: Index1452665
+Node: Bug address1296435
+Node: Usenet1299954
+Node: Performance bugs1301143
+Node: Asking for help1304064
+Node: Maintainers1306031
+Node: Other Versions1307038
+Node: Installation summary1315308
+Node: Notes1316665
+Node: Compatibility Mode1317459
+Node: Additions1318241
+Node: Accessing The Source1319166
+Node: Adding Code1320603
+Node: New Ports1327418
+Node: Derived Files1331793
+Ref: Derived Files-Footnote-11337453
+Ref: Derived Files-Footnote-21337488
+Ref: Derived Files-Footnote-31338086
+Node: Future Extensions1338200
+Node: Implementation Limitations1338858
+Node: Extension Design1340068
+Node: Old Extension Problems1341212
+Ref: Old Extension Problems-Footnote-11342730
+Node: Extension New Mechanism Goals1342787
+Ref: Extension New Mechanism Goals-Footnote-11346151
+Node: Extension Other Design Decisions1346340
+Node: Extension Future Growth1348453
+Node: Notes summary1349059
+Node: Basic Concepts1350217
+Node: Basic High Level1350898
+Ref: figure-general-flow1351180
+Ref: figure-process-flow1351866
+Ref: Basic High Level-Footnote-11355168
+Node: Basic Data Typing1355353
+Node: Glossary1358681
+Node: Copying1390568
+Node: GNU Free Documentation License1428111
+Node: Index1453231
 
 End Tag Table
 
diff --git a/doc/gawk.texi b/doc/gawk.texi
index c4fa3124..61e740fc 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -43906,6 +43906,48 @@ For more information, see 
@uref{http://www.skeeve.com/fork-my-code.html,
 @cite{Fork My Code, Please!---An Open Letter To Those of You Who Are Unhappy}},
 by Arnold Robbins and Chet Ramey.
 
+@cindex sidebar @subentry A Note About Fuzzers
+@ifdocbook
+@docbook
+<sidebar><title>A Note About Fuzzers</title>
+@end docbook
+
+In recent years, people have been running ``fuzzers'' to generate
+invalid @command{awk} programs in order to find and report (so-called)
+bugs in @command{gawk}.
+
+In general, such reports are not of much practical use.  The programs
+they create are not realistic and the bugs found are generally from
+some kind of memory corruption that is fatal anyway.
+
+So, if you want to run a fuzzer against @command{gawk} and report the
+results, you may do so, but be aware that such reports don't carry the
+same weight as reports of real bugs do.
+
+@docbook
+</sidebar>
+@end docbook
+@end ifdocbook
+
+@ifnotdocbook
+@cartouche
+@center @b{A Note About Fuzzers}
+
+
+In recent years, people have been running ``fuzzers'' to generate
+invalid @command{awk} programs in order to find and report (so-called)
+bugs in @command{gawk}.
+
+In general, such reports are not of much practical use.  The programs
+they create are not realistic and the bugs found are generally from
+some kind of memory corruption that is fatal anyway.
+
+So, if you want to run a fuzzer against @command{gawk} and report the
+results, you may do so, but be aware that such reports don't carry the
+same weight as reports of real bugs do.
+@end cartouche
+@end ifnotdocbook
+
 @node Bug address
 @appendixsubsec Submitting Bug Reports
 
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index d2e8f6de..a9274424 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -42749,6 +42749,20 @@ For more information, see 
@uref{http://www.skeeve.com/fork-my-code.html,
 @cite{Fork My Code, Please!---An Open Letter To Those of You Who Are Unhappy}},
 by Arnold Robbins and Chet Ramey.
 
+@sidebar A Note About Fuzzers
+In recent years, people have been running ``fuzzers'' to generate
+invalid @command{awk} programs in order to find and report (so-called)
+bugs in @command{gawk}.
+
+In general, such reports are not of much practical use.  The programs
+they create are not realistic and the bugs found are generally from
+some kind of memory corruption that is fatal anyway.
+
+So, if you want to run a fuzzer against @command{gawk} and report the
+results, you may do so, but be aware that such reports don't carry the
+same weight as reports of real bugs do.
+@end sidebar
+
 @node Bug address
 @appendixsubsec Submitting Bug Reports
 
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 753eb4e2..9b09d8e9 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2022-08-25         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.tst: Regenerated.
+
 2022-08-14         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 5641486f..e8e75e0f 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -203,9 +203,9 @@ GAWK_EXT_TESTS = \
        lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 mdim1 mdim2 \
        mdim3 mdim4 mixed1 mktime modifiers muldimposix nastyparm negtime \
        next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
-       nsawk1c nsawk2a nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse \
-       nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 octdec \
-       patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 \
+       nsawk1c nsawk2a nsawk2b nsbad nsbad2 nsbad3 nsbad_cmd nsforloop \
+       nsfuncrecurse nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 \
+       octdec patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 \
        printhuge procinfs profile0 profile1 profile2 profile3 profile4 \
        profile5 profile6 profile7 profile8 profile9 profile10 profile11 \
        profile12 profile13 profile14 profile15 profile16 profile17 pty1 \
@@ -3135,6 +3135,16 @@ nsbad:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+nsbad2:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nsbad3:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 nsforloop:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 90d3dd73..3a2691ed 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
+2022-08-25         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.am (EXTRA_DIST): nsbad2, nsbad3: new tests.
+       * nsbad2.awk, nsbad2.ok, nsbad3.awk, nsbad3.ok: New files.
+       * lintwarn.awk, lintwarn.ok, noparms.ok, nsbad.awk, nsbad.ok,
+       parseme.ok, synerr3.ok, unterm.ok: Modified after code changes.
+
 2022-08-14         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (EXTRA_DIST): divzero: new test.
diff --git a/test/Makefile.am b/test/Makefile.am
index fcc8002b..962885b5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -867,6 +867,10 @@ EXTRA_DIST = \
        nsawk2b.ok \
        nsbad.awk \
        nsbad.ok \
+       nsbad2.awk \
+       nsbad2.ok \
+       nsbad3.awk \
+       nsbad3.ok \
        nsbad_cmd.ok \
        nsforloop.awk \
        nsforloop.ok \
@@ -1489,9 +1493,9 @@ GAWK_EXT_TESTS = \
        lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 mdim1 mdim2 \
        mdim3 mdim4 mixed1 mktime modifiers muldimposix nastyparm negtime \
        next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
-       nsawk1c nsawk2a nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse \
-       nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 octdec \
-       patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 \
+       nsawk1c nsawk2a nsawk2b nsbad nsbad2 nsbad3 nsbad_cmd nsforloop \
+       nsfuncrecurse nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 \
+       octdec patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 \
        printhuge procinfs profile0 profile1 profile2 profile3 profile4 \
        profile5 profile6 profile7 profile8 profile9 profile10 profile11 \
        profile12 profile13 profile14 profile15 profile16 profile17 pty1 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 6aa3badb..f7ac3cfa 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1135,6 +1135,10 @@ EXTRA_DIST = \
        nsawk2b.ok \
        nsbad.awk \
        nsbad.ok \
+       nsbad2.awk \
+       nsbad2.ok \
+       nsbad3.awk \
+       nsbad3.ok \
        nsbad_cmd.ok \
        nsforloop.awk \
        nsforloop.ok \
@@ -1757,9 +1761,9 @@ GAWK_EXT_TESTS = \
        lintwarn manyfiles match1 match2 match3 mbstr1 mbstr2 mdim1 mdim2 \
        mdim3 mdim4 mixed1 mktime modifiers muldimposix nastyparm negtime \
        next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
-       nsawk1c nsawk2a nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse \
-       nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 octdec \
-       patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 \
+       nsawk1c nsawk2a nsawk2b nsbad nsbad2 nsbad3 nsbad_cmd nsforloop \
+       nsfuncrecurse nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 \
+       octdec patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 \
        printhuge procinfs profile0 profile1 profile2 profile3 profile4 \
        profile5 profile6 profile7 profile8 profile9 profile10 profile11 \
        profile12 profile13 profile14 profile15 profile16 profile17 pty1 \
@@ -4869,6 +4873,16 @@ nsbad:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+nsbad2:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nsbad3:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 nsforloop:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index c2854288..8b88ed83 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1830,6 +1830,16 @@ nsbad:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+nsbad2:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+nsbad3:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 nsforloop:
        @echo $@
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/lintwarn.awk b/test/lintwarn.awk
index d430a2b4..cca53d8e 100644
--- a/test/lintwarn.awk
+++ b/test/lintwarn.awk
@@ -23,7 +23,7 @@ BEGIN {
        break
        continue
        next
-       a[]
+       a
        f(/pqr/)
        //
        /* */
diff --git a/test/lintwarn.ok b/test/lintwarn.ok
index 4f503b46..5a80599a 100644
--- a/test/lintwarn.ok
+++ b/test/lintwarn.ok
@@ -20,9 +20,6 @@ gawk: lintwarn.awk:24: error: `continue' is not allowed 
outside a loop
 gawk: lintwarn.awk:23: error: `break' is not allowed outside a loop or switch
 gawk: lintwarn.awk:24: error: `continue' is not allowed outside a loop
 gawk: lintwarn.awk:25: error: `next' used in BEGIN action
-gawk: lintwarn.awk:26:         a[]
-gawk: lintwarn.awk:26:           ^ syntax error
-gawk: lintwarn.awk:26: error: invalid subscript expression
 gawk: lintwarn.awk:26: warning: statement has no effect
 gawk: lintwarn.awk:27: warning: regexp constant for parameter #1 yields 
boolean value
 gawk: lintwarn.awk:28: warning: regexp constant `//' looks like a C++ comment, 
but is not
diff --git a/test/noparms.ok b/test/noparms.ok
index 504c4e41..578a16dc 100644
--- a/test/noparms.ok
+++ b/test/noparms.ok
@@ -1,5 +1,3 @@
 gawk: noparms.awk:1: function x(a, b, c , ,) {}
 gawk: noparms.awk:1:                      ^ syntax error
-gawk: noparms.awk:1: function x(a, b, c , ,) {}
-gawk: noparms.awk:1:                       ^ syntax error
 EXIT CODE: 1
diff --git a/test/nsbad.awk b/test/nsbad.awk
index 825bb35c..13380643 100644
--- a/test/nsbad.awk
+++ b/test/nsbad.awk
@@ -5,11 +5,5 @@
 
 BEGIN {
        foo75::bar = 57
-       if::junk = 1
        foo::match = 3
 }
-
-@namespace "foo"
-function gsub () {
-       print "foo::gsub"
-}
diff --git a/test/nsbad.ok b/test/nsbad.ok
index dfa228a7..bcb4ce25 100644
--- a/test/nsbad.ok
+++ b/test/nsbad.ok
@@ -2,12 +2,7 @@ gawk: nsbad.awk:1: error: namespace name `1foo' must meet 
identifier naming rule
 gawk: nsbad.awk:2: error: using reserved identifier `for' as a namespace is 
not allowed
 gawk: nsbad.awk:3: error: namespace name `42f' must meet identifier naming 
rules
 gawk: nsbad.awk:4: error: namespace name `ab#d' must meet identifier naming 
rules
-gawk: nsbad.awk:8: error: using reserved identifier `if' as a namespace is not 
allowed
-gawk: nsbad.awk:8:     if::junk = 1
-gawk: nsbad.awk:8:              ^ syntax error
-gawk: nsbad.awk:9: error: using reserved identifier `match' as second 
component of a qualified name is not allowed
-gawk: nsbad.awk:9:     foo::match = 3
-gawk: nsbad.awk:9:                ^ syntax error
-gawk: nsbad.awk:13: function gsub () {
-gawk: nsbad.awk:13:          ^ `gsub' is a built-in function, it cannot be 
redefined
+gawk: nsbad.awk:8: error: using reserved identifier `match' as second 
component of a qualified name is not allowed
+gawk: nsbad.awk:8:     foo::match = 3
+gawk: nsbad.awk:8:                ^ syntax error
 EXIT CODE: 1
diff --git a/test/nsbad2.awk b/test/nsbad2.awk
new file mode 100644
index 00000000..ffad0ac3
--- /dev/null
+++ b/test/nsbad2.awk
@@ -0,0 +1,4 @@
+@namespace "foo"
+function gsub () {
+       print "foo::gsub"
+}
diff --git a/test/nsbad2.ok b/test/nsbad2.ok
new file mode 100644
index 00000000..fa4f3a55
--- /dev/null
+++ b/test/nsbad2.ok
@@ -0,0 +1,3 @@
+gawk: nsbad2.awk:2: function gsub () {
+gawk: nsbad2.awk:2:          ^ `gsub' is a built-in function, it cannot be 
redefined
+EXIT CODE: 1
diff --git a/test/nsbad3.awk b/test/nsbad3.awk
new file mode 100644
index 00000000..3466e4c7
--- /dev/null
+++ b/test/nsbad3.awk
@@ -0,0 +1,3 @@
+BEGIN {
+       if::junk = 3
+}
diff --git a/test/nsbad3.ok b/test/nsbad3.ok
new file mode 100644
index 00000000..8adecdaa
--- /dev/null
+++ b/test/nsbad3.ok
@@ -0,0 +1,4 @@
+gawk: nsbad3.awk:2: error: using reserved identifier `if' as a namespace is 
not allowed
+gawk: nsbad3.awk:2:    if::junk = 3
+gawk: nsbad3.awk:2:             ^ syntax error
+EXIT CODE: 1
diff --git a/test/parseme.ok b/test/parseme.ok
index 83c0d056..ddc610a1 100644
--- a/test/parseme.ok
+++ b/test/parseme.ok
@@ -1,5 +1,3 @@
 gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
 gawk: parseme.awk:1:                       ^ syntax error
-gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
-gawk: parseme.awk:1:                                 ^ 3 is invalid as number 
of arguments for toupper
 EXIT CODE: 1
diff --git a/test/synerr3.ok b/test/synerr3.ok
index b8b9dd89..399478a7 100644
--- a/test/synerr3.ok
+++ b/test/synerr3.ok
@@ -1,5 +1,3 @@
 gawk: synerr3.awk:1: for (i = ) in foo bar baz
 gawk: synerr3.awk:1: ^ syntax error
-gawk: synerr3.awk:1: for (i = ) in foo bar baz
-gawk: synerr3.awk:1:          ^ syntax error
-EXIT CODE: 2
+EXIT CODE: 1
diff --git a/test/unterm.ok b/test/unterm.ok
index 399f626a..a8e7e598 100644
--- a/test/unterm.ok
+++ b/test/unterm.ok
@@ -1,5 +1,3 @@
 gawk: unterm.awk:1: 
BEGIN{x=".........................................................................................................................................................................................................................................................}
 gawk: unterm.awk:1:         ^ unterminated string
-gawk: unterm.awk:1: (END OF FILE)
-gawk: unterm.awk:1:         ^ source files / command-line arguments must 
contain complete functions or rules
 EXIT CODE: 1

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |  8 +++++
 NEWS              | 55 ++++++++++++++++++----------------
 awkgram.c         |  2 ++
 awkgram.y         |  2 ++
 doc/ChangeLog     |  4 +++
 doc/gawk.info     | 89 ++++++++++++++++++++++++++++++++-----------------------
 doc/gawk.texi     | 42 ++++++++++++++++++++++++++
 doc/gawktexi.in   | 14 +++++++++
 pc/ChangeLog      |  4 +++
 pc/Makefile.tst   | 16 ++++++++--
 test/ChangeLog    |  7 +++++
 test/Makefile.am  | 10 +++++--
 test/Makefile.in  | 20 +++++++++++--
 test/Maketests    | 10 +++++++
 test/lintwarn.awk |  2 +-
 test/lintwarn.ok  |  3 --
 test/noparms.ok   |  2 --
 test/nsbad.awk    |  6 ----
 test/nsbad.ok     | 11 ++-----
 test/nsbad2.awk   |  4 +++
 test/nsbad2.ok    |  3 ++
 test/nsbad3.awk   |  3 ++
 test/nsbad3.ok    |  4 +++
 test/parseme.ok   |  2 --
 test/synerr3.ok   |  4 +--
 test/unterm.ok    |  2 --
 26 files changed, 230 insertions(+), 99 deletions(-)
 create mode 100644 test/nsbad2.awk
 create mode 100644 test/nsbad2.ok
 create mode 100644 test/nsbad3.awk
 create mode 100644 test/nsbad3.ok


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]