[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4406-g09eaaaf6
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4406-g09eaaaf6 |
Date: |
Tue, 24 May 2022 16:47:28 -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, gawk-5.1-stable has been updated
via 09eaaaf6608e63813087fb746d2bf2b1701d9e81 (commit)
from 9a1e7448b6ac3f7b468e72af9f013f61fcf63239 (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=09eaaaf6608e63813087fb746d2bf2b1701d9e81
commit 09eaaaf6608e63813087fb746d2bf2b1701d9e81
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Tue May 24 16:47:10 2022 -0400
Small bug fix and new test case.
diff --git a/ChangeLog b/ChangeLog
index b840440a..5e462951 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-05-24 Adam Van Scyoc <avanscy@g.clemson.edu>
+
+ * awkgram.y (make_assignable): Handle Op_field_assign.
+ Avoids a core dump upon a certain kind of syntax error;
+ see test/getlnfa.awk.
+
2022-05-11 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_list): Typo fix in a comment.
diff --git a/awkgram.c b/awkgram.c
index 8daf506a..117f338f 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -7906,6 +7906,10 @@ make_assignable(INSTRUCTION *ip)
case Op_subscript:
ip->opcode = Op_subscript_lhs;
return ip;
+ case Op_field_assign:
+ // no need to change the opcode, but do need to return
+ // a non-NULL pointer.
+ return ip;
default:
break; /* keeps gcc -Wall happy */
}
@@ -9183,7 +9187,6 @@ merge_comments(INSTRUCTION *c1, INSTRUCTION *c2)
}
if (c2 != NULL) {
- // strcat(buffer, "\n");
strcat(buffer, c2->memory->stptr);
if (c2->comment != NULL) {
strcat(buffer, "\n");
diff --git a/awkgram.y b/awkgram.y
index 2371d0b4..d9dbaa71 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -5398,6 +5398,10 @@ make_assignable(INSTRUCTION *ip)
case Op_subscript:
ip->opcode = Op_subscript_lhs;
return ip;
+ case Op_field_assign:
+ // no need to change the opcode, but do need to return
+ // a non-NULL pointer.
+ return ip;
default:
break; /* keeps gcc -Wall happy */
}
diff --git a/pc/ChangeLog b/pc/ChangeLog
index d2e6a846..11651642 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2022-05-24 Adam Van Scyoc <avanscy@g.clemson.edu>
+
+ * Makefile.tst: Regenerated.
+
2022-04-28 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 666187d7..de31f7c6 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -155,7 +155,7 @@ BASIC_TESTS = \
fldchgnf fldterm fnamedat fnarray fnarray2 fnaryscl fnasgnm \
fnmisc fordel forref forsimp fsbs fscaret fsnul1 fsrs fsspcoln \
fstabplus funsemnl funsmnam funstack getline getline2 getline3 \
- getline4 getline5 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \
+ getline4 getline5 getlnbuf getlnfa getnr2tb getnr2tm gsubasgn gsubtest \
gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 gsubtst7 gsubtst8 \
hex hex2 hsprint inpref inputred intest intprec iobug1 leaddig \
leadnl litoct longsub longwrds manglprm math membug1 memleak \
@@ -2540,6 +2540,11 @@ getlnhd:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+getlnfa:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
localenl:
@echo $@
@-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo
EXIT CODE: $$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 16d04218..b3399c69 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-24 Adam Van Scyoc <avanscy@g.clemson.edu>
+
+ * Makefile.am (EXTRA_DIST): getlnfa, new test.
+ * getlnfa.awk, getlnfa.ok: New files.
+
2022-04-28 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): symtab12, new test.
diff --git a/test/Makefile.am b/test/Makefile.am
index eade5437..d3398afb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -486,6 +486,8 @@ EXTRA_DIST = \
getlnbuf.ok \
getlndir.awk \
getlndir.ok \
+ getlnfa.awk \
+ getlnfa.ok \
getlnhd.awk \
getlnhd.ok \
getnr2tb.awk \
@@ -1422,7 +1424,7 @@ BASIC_TESTS = \
fldchgnf fldterm fnamedat fnarray fnarray2 fnaryscl fnasgnm \
fnmisc fordel forref forsimp fsbs fscaret fsnul1 fsrs fsspcoln \
fstabplus funsemnl funsmnam funstack getline getline2 getline3 \
- getline4 getline5 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \
+ getline4 getline5 getlnbuf getlnfa getnr2tb getnr2tm gsubasgn gsubtest \
gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 gsubtst7 gsubtst8 \
hex hex2 hsprint inpref inputred intest intprec iobug1 leaddig \
leadnl litoct longsub longwrds manglprm math membug1 memleak \
diff --git a/test/Makefile.in b/test/Makefile.in
index cb6c2b2c..7a10363e 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -752,6 +752,8 @@ EXTRA_DIST = \
getlnbuf.ok \
getlndir.awk \
getlndir.ok \
+ getlnfa.awk \
+ getlnfa.ok \
getlnhd.awk \
getlnhd.ok \
getnr2tb.awk \
@@ -1688,7 +1690,7 @@ BASIC_TESTS = \
fldchgnf fldterm fnamedat fnarray fnarray2 fnaryscl fnasgnm \
fnmisc fordel forref forsimp fsbs fscaret fsnul1 fsrs fsspcoln \
fstabplus funsemnl funsmnam funstack getline getline2 getline3 \
- getline4 getline5 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \
+ getline4 getline5 getlnbuf getlnfa getnr2tb getnr2tm gsubasgn gsubtest \
gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 gsubtst7 gsubtst8 \
hex hex2 hsprint inpref inputred intest intprec iobug1 leaddig \
leadnl litoct longsub longwrds manglprm math membug1 memleak \
@@ -4248,6 +4250,11 @@ getlnhd:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+getlnfa:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
localenl:
@echo $@
@-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo
EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 8d19ea87..2957e89c 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1283,6 +1283,11 @@ getlnhd:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+getlnfa:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
localenl:
@echo $@
@-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo
EXIT CODE: $$? >>_$@
diff --git a/test/getlnfa.awk b/test/getlnfa.awk
new file mode 100644
index 00000000..1e82d546
--- /dev/null
+++ b/test/getlnfa.awk
@@ -0,0 +1 @@
+getline $1+++++++
diff --git a/test/getlnfa.ok b/test/getlnfa.ok
new file mode 100644
index 00000000..416704e0
--- /dev/null
+++ b/test/getlnfa.ok
@@ -0,0 +1,3 @@
+gawk: getlnfa.awk:1: getline $1+++++++
+gawk: getlnfa.awk:1: ^ syntax error
+EXIT CODE: 1
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
awkgram.c | 5 ++++-
awkgram.y | 4 ++++
pc/ChangeLog | 4 ++++
pc/Makefile.tst | 7 ++++++-
test/ChangeLog | 5 +++++
test/Makefile.am | 4 +++-
test/Makefile.in | 9 ++++++++-
test/Maketests | 5 +++++
test/getlnfa.awk | 1 +
test/getlnfa.ok | 3 +++
11 files changed, 49 insertions(+), 4 deletions(-)
create mode 100644 test/getlnfa.awk
create mode 100644 test/getlnfa.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4406-g09eaaaf6,
Arnold Robbins <=