Projects
Factory:RISC-V:Base
gawk
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:gawk.spec
Changed
@@ -4,7 +4,7 @@ egrep -i "gawk_api_minor.*0-9+" | egrep -o "0-9") Name: gawk Version: 5.2.0 -Release: 1 +Release: 2 License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD Summary: The GNU version of the AWK text processing utility URL: https://www.gnu.org/software/gawk/ @@ -16,6 +16,12 @@ Patch4: pma.patch Patch5: Disable-pma-test.awk.patch +Patch6: backport-Fix-a-bug-with-Node_elem_new.patch +Patch7: backport-Additional-fix-for-Node_elem_new.patch +Patch8: backport-Yet-another-fix-and-test-for-Node_elem_new.patch +Patch9: backport-Fix-a-memory-leak.patch +Patch10: backport-Code-simplification-in-interpret.h.patch + BuildRequires: gcc automake grep BuildRequires: bison texinfo texinfo-tex ghostscript texlive-ec texlive-cm-super glibc-all-langpacks BuildRequires: libsigsegv-devel mpfr-devel readline-devel @@ -110,6 +116,17 @@ %{_datadir}/locale/* %changelog +* Thu Jan 12 2023 Jiayi Chen <chenjiayi22@huawei.com> - 5.2.0-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:backport five patches from upstream to fix double free bug in 5.2.0-1 + backport-Fix-a-bug-with-Node_elem_new.patch + backport-Additional-fix-for-Node_elem_new.patch + backport-Yet-another-fix-and-test-for-Node_elem_new.patch + backport-Fix-a-memory-leak.patch + backport-Code-simplification-in-interpret.h.patch + * Wed Oct 19 2022 dillon chen <dillon.chen@gmail.com> - 5.2.0-1 - update to 5.2.0 - Patch5: Disable pma tests when running in linux-user emulation
View file
_service:tar_scm:backport-Additional-fix-for-Node_elem_new.patch
Added
@@ -0,0 +1,259 @@ +From 2848045aed5ccfd7b582808288f7fcc18d319952 Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" <arnold@skeeve.com> +Date: Wed, 14 Sep 2022 22:33:39 +0300 +Subject: Additional fix for Node_elem_new. + +Reference:https://git.savannah.gnu.org/cgit/gawk.git/patch/?id=2848045aed5ccfd7b582808288f7fcc18d319952 +Conflict:tailoring commit on ChangeLog +--- + interpret.h | 14 ++++++++++---- + pc/ChangeLog | 4 ++++ + pc/Makefile.tst | 18 +++++++++++++++++- + test/ChangeLog | 5 +++-- + test/Makefile.am | 7 ++++++- + test/Makefile.in | 17 ++++++++++++++++- + test/Maketests | 10 ++++++++++ + test/elemnew2.awk | 6 ++++++ + test/elemnew2.ok | 2 ++ + test/elemnew3.awk | 8 ++++++++ + test/elemnew3.ok | 0 + 11 files changed, 81 insertions(+), 9 deletions(-) + create mode 100644 test/elemnew2.awk + create mode 100644 test/elemnew2.ok + create mode 100644 test/elemnew3.awk + create mode 100644 test/elemnew3.ok + +diff --git a/interpret.h b/interpret.h +index 268655b..26010ad 100644 +--- a/interpret.h ++++ b/interpret.h +@@ -213,7 +213,7 @@ top: + case Node_var_new: + uninitialized_scalar: + if (op != Op_push_arg_untyped) { +- /* convert untyped to scalar */ ++ /* convert very original untyped to scalar */ + m->type = Node_var; + m->var_value = dupnode(Nnull_string); + } +@@ -222,6 +222,7 @@ uninitialized_scalar: + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); ++ // set up local param by value + if (op != Op_push_arg_untyped) + m = dupnode(Nnull_string); + UPREF(m); +@@ -230,15 +231,20 @@ uninitialized_scalar: + + case Node_elem_new: + if (op != Op_push_arg_untyped) { +- /* convert untyped to scalar */ +- m = elem_new_to_scalar(m); ++ /* convert very original untyped to scalar */ ++ m->type = Node_var; ++ m->var_value = dupnode(Nnull_string); + } + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); +- UPREF(m); ++ // set up local param by value ++ if (op != Op_push_arg_untyped) { ++ m = elem_new_to_scalar(m); ++ } ++ + PUSH(m); + break; + +diff --git a/pc/ChangeLog b/pc/ChangeLog +index a78ccfc..67ee4d2 100644 +--- a/pc/ChangeLog ++++ b/pc/ChangeLog +@@ -1,3 +1,7 @@ ++2022-09-14 Arnold D. Robbins <arnold@skeeve.com> ++ ++ * Makefile.tst: Regenerated. ++ + 2022-09-04 Arnold D. Robbins <arnold@skeeve.com> + + * 5.2.0: Release tar ball made. +diff --git a/pc/Makefile.tst b/pc/Makefile.tst +index 269ec8a..9e40cd2 100644 +--- a/pc/Makefile.tst ++++ b/pc/Makefile.tst +@@ -190,7 +190,8 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars errno exit fieldwdth forcenum fpat1 fpat2 \ ++ dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 \ ++ errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ + fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \ +@@ -2735,6 +2736,21 @@ dfacheck1: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew1: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ ++elemnew2: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ ++elemnew3: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@ + @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +diff --git a/test/ChangeLog b/test/ChangeLog +index ea08ede..434cbd9 100644 +--- a/test/ChangeLog ++++ b/test/ChangeLog +@@ -1,7 +1,8 @@ + 2022-09-14 Arnold D. Robbins <arnold@skeeve.com> + +- * Makefile.am (EXTRA_DIST): New test: elemnew1. +- * elemnew1.awk, elemnew1.ok: New files. ++ * Makefile.am (EXTRA_DIST): New tests: elemnew1, elemnew2, elemnew3. ++ * elemnew1.awk, elemnew1.ok, elemnew2.awk, elemnew2.ok, ++ elemnew3.awk, elemnew3.ok: New files. + + 2022-09-04 Arnold D. Robbins <arnold@skeeve.com> + +diff --git a/test/Makefile.am b/test/Makefile.am +index 8a5c3c4..8b0a24e 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -284,6 +284,10 @@ EXTRA_DIST = \ + dynlj.ok \ + elemnew1.awk \ + elemnew1.ok \ ++ elemnew2.awk \ ++ elemnew2.ok \ ++ elemnew3.awk \ ++ elemnew3.ok \ + escapebrace.awk \ + escapebrace.in \ + escapebrace.ok \ +@@ -1482,7 +1486,8 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars elemnew1 errno exit fieldwdth forcenum fpat1 fpat2 \ ++ dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 \ ++ errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ + fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \ +diff --git a/test/Makefile.in b/test/Makefile.in +index a4fb1cc..9240a42 100644 +--- a/test/Makefile.in ++++ b/test/Makefile.in +@@ -552,6 +552,10 @@ EXTRA_DIST = \ + dynlj.ok \ + elemnew1.awk \ + elemnew1.ok \ ++ elemnew2.awk \ ++ elemnew2.ok \ ++ elemnew3.awk \ ++ elemnew3.ok \ + escapebrace.awk \ + escapebrace.in \ + escapebrace.ok \ +@@ -1750,7 +1754,8 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars elemnew1 errno exit fieldwdth forcenum fpat1 fpat2 \ ++ dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 \ ++ errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ + fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \ +@@ -4483,6 +4488,16 @@ elemnew1: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew2: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ ++elemnew3: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@
View file
_service:tar_scm:backport-Code-simplification-in-interpret.h.patch
Added
@@ -0,0 +1,70 @@ +From c0c9f468b12a79ad8277f0e2b9ff7d42f48490bf Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" <arnold@skeeve.com> +Date: Tue, 25 Oct 2022 07:25:20 +0300 +Subject: Code simplification in interpret.h. + +Reference:https://git.savannah.gnu.org/cgit/gawk.git/patch/?id=c0c9f468b12a79ad8277f0e2b9ff7d42f48490bf +Conflict:tailoring commits on ChangeLog +--- + interpret.h | 30 +++++++++++++++--------------- + 1 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/interpret.h b/interpret.h +index f703080..4540d30 100644 +--- a/interpret.h ++++ b/interpret.h +@@ -212,38 +212,38 @@ top: + + case Node_var_new: + uninitialized_scalar: +- if (op != Op_push_arg_untyped) { +- /* convert very original untyped to scalar */ +- m->type = Node_var; +- m->var_value = dupnode(Nnull_string); +- } +- + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); +- // set up local param by value +- if (op != Op_push_arg_untyped) +- m = dupnode(Nnull_string); +- UPREF(m); +- PUSH(m); +- break; + +- case Node_elem_new: + if (op != Op_push_arg_untyped) { +- /* convert very original untyped to scalar */ ++ // convert very original untyped to scalar + m->type = Node_var; + m->var_value = dupnode(Nnull_string); ++ ++ // set up local param by value ++ m = dupnode(Nnull_string); + } + ++ UPREF(m); ++ PUSH(m); ++ break; ++ ++ case Node_elem_new: + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); +- // set up local param by value ++ + if (op != Op_push_arg_untyped) { ++ // convert very original untyped to scalar ++ m->type = Node_var; ++ m->var_value = dupnode(Nnull_string); ++ ++ // set up local param by value + DEREF(m); + m = dupnode(Nnull_string); + } +--
View file
_service:tar_scm:backport-Fix-a-bug-with-Node_elem_new.patch
Added
@@ -0,0 +1,135 @@ +From baab183439ff4e0c6b77d62156d447e61fc1dcfb Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" <arnold@skeeve.com> +Date: Wed, 14 Sep 2022 21:08:59 +0300 +Subject: Fix a bug with Node_elem_new. + +Reference:https://git.savannah.gnu.org/cgit/gawk.git/patch/?id=baab183439ff4e0c6b77d62156d447e61fc1dcfb +Conflict:tailoring commit on ChangeLog +--- + interpret.h | 1 + + test/ChangeLog | 5 +++++ + test/Makefile.am | 4 +++- + test/Makefile.in | 9 ++++++++- + test/Maketests | 5 +++++ + test/elemnew1.awk | 9 +++++++++ + test/elemnew1.ok | 0 + 7 files changed, 31 insertions(+), 2 deletions(-) + create mode 100644 test/elemnew1.awk + create mode 100644 test/elemnew1.ok + +diff --git a/interpret.h b/interpret.h +index 57d060e..268655b 100644 +--- a/interpret.h ++++ b/interpret.h +@@ -238,6 +238,7 @@ uninitialized_scalar: + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); ++ UPREF(m); + PUSH(m); + break; + +diff --git a/test/ChangeLog b/test/ChangeLog +index a73637b..ea08ede 100644 +--- a/test/ChangeLog ++++ b/test/ChangeLog +@@ -1,3 +1,8 @@ ++2022-09-14 Arnold D. Robbins <arnold@skeeve.com> ++ ++ * Makefile.am (EXTRA_DIST): New test: elemnew1. ++ * elemnew1.awk, elemnew1.ok: New files. ++ + 2022-09-04 Arnold D. Robbins <arnold@skeeve.com> + + * 5.2.0: Release tar ball made. +diff --git a/test/Makefile.am b/test/Makefile.am +index ab06974..8a5c3c4 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -282,6 +282,8 @@ EXTRA_DIST = \ + dumpvars.ok \ + dynlj.awk \ + dynlj.ok \ ++ elemnew1.awk \ ++ elemnew1.ok \ + escapebrace.awk \ + escapebrace.in \ + escapebrace.ok \ +@@ -1480,7 +1482,7 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars errno exit fieldwdth forcenum fpat1 fpat2 \ ++ dfacheck1 dumpvars elemnew1 errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ + fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \ +diff --git a/test/Makefile.in b/test/Makefile.in +index 834feb0..a4fb1cc 100644 +--- a/test/Makefile.in ++++ b/test/Makefile.in +@@ -550,6 +550,8 @@ EXTRA_DIST = \ + dumpvars.ok \ + dynlj.awk \ + dynlj.ok \ ++ elemnew1.awk \ ++ elemnew1.ok \ + escapebrace.awk \ + escapebrace.in \ + escapebrace.ok \ +@@ -1748,7 +1750,7 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars errno exit fieldwdth forcenum fpat1 fpat2 \ ++ dfacheck1 dumpvars elemnew1 errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ + fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \ +@@ -4476,6 +4478,11 @@ dfacheck1: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew1: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@ + @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +diff --git a/test/Maketests b/test/Maketests +index 3a667af..90828e7 100644 +--- a/test/Maketests ++++ b/test/Maketests +@@ -1432,6 +1432,11 @@ dfacheck1: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew1: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@ + @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +diff --git a/test/elemnew1.awk b/test/elemnew1.awk +new file mode 100644 +index 0000000..58dc9fc +--- /dev/null ++++ b/test/elemnew1.awk +@@ -0,0 +1,9 @@ ++function add_flags(old) { ++ if (old) ++ return 0 ++ if (!old) ++ return 1 ++} ++BEGIN { ++ a0=add_flags(a0) ++} +diff --git a/test/elemnew1.ok b/test/elemnew1.ok +new file mode 100644 +index 0000000..e69de29 +--
View file
_service:tar_scm:backport-Fix-a-memory-leak.patch
Added
@@ -0,0 +1,40 @@ +From bc8957f4f5e1aafd00c82b52f4c82997b7cfc183 Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" <arnold@skeeve.com> +Date: Fri, 30 Sep 2022 12:59:47 +0300 +Subject: Fix a memory leak. + +Reference:https://git.savannah.gnu.org/cgit/gawk.git/patch/?id=bc8957f4f5e1aafd00c82b52f4c82997b7cfc183 +Conflict:tailoring commit on ChangeLog +--- + interpret.h | 3 +++ + 1 files changed, 3 insertions(+) + +diff --git a/interpret.h b/interpret.h +index fde02d2..f703080 100644 +--- a/interpret.h ++++ b/interpret.h +@@ -217,6 +217,7 @@ uninitialized_scalar: + m->type = Node_var; + m->var_value = dupnode(Nnull_string); + } ++ + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : +@@ -235,6 +236,7 @@ uninitialized_scalar: + m->type = Node_var; + m->var_value = dupnode(Nnull_string); + } ++ + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : +@@ -242,6 +244,7 @@ uninitialized_scalar: + save_symbol->vname); + // set up local param by value + if (op != Op_push_arg_untyped) { ++ DEREF(m); + m = dupnode(Nnull_string); + } + +--
View file
_service:tar_scm:backport-Yet-another-fix-and-test-for-Node_elem_new.patch
Added
@@ -0,0 +1,3550 @@ +From 3d7178e78e523574649578593192bab2e0d08a2a Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" <arnold@skeeve.com> +Date: Fri, 23 Sep 2022 11:22:40 +0300 +Subject: Yet another fix and test for Node_elem_new. + +Reference:https://git.savannah.gnu.org/cgit/gawk.git/patch/?id=3d7178e78e523574649578593192bab2e0d08a2a +Conflict:tailoring commits on ChangeLog and test/ChangeLog +--- + interpret.h | 2 +- + pc/Makefile.tst | 7 +- + test/Makefile.am | 5 +- + test/Makefile.in | 10 +- + test/Maketests | 5 + + test/elemnew4.awk | 441 +++++++++++ + test/elemnew4.in | 1188 ++++++++++++++++++++++++++++++ + test/elemnew4.ok | 1767 +++++++++++++++++++++++++++++++++++++++++++++ + 8 files changed, 3421 insertions(+), 4 deletions(-) + create mode 100644 test/elemnew4.awk + create mode 100644 test/elemnew4.in + create mode 100644 test/elemnew4.ok + +diff --git a/interpret.h b/interpret.h +index 26010ad..7b12ef7 100644 +--- a/interpret.h ++++ b/interpret.h +@@ -242,7 +242,7 @@ uninitialized_scalar: + save_symbol->vname); + // set up local param by value + if (op != Op_push_arg_untyped) { +- m = elem_new_to_scalar(m); ++ m = dupnode(Nnull_string); + } + + PUSH(m); +diff --git a/pc/Makefile.tst b/pc/Makefile.tst +index 9e40cd2..2080c61 100644 +--- a/pc/Makefile.tst ++++ b/pc/Makefile.tst +@@ -190,7 +190,7 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 \ ++ dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 elemnew4 \ + errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ +@@ -2751,6 +2751,11 @@ elemnew3: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew4: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@ + @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +diff --git a/test/Makefile.am b/test/Makefile.am +index 93d8c0b..0306c04 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -288,6 +288,9 @@ EXTRA_DIST = \ + elemnew2.ok \ + elemnew3.awk \ + elemnew3.ok \ ++ elemnew4.wak \ ++ elemnew4.in \ ++ elemnew4.ok \ + escapebrace.awk \ + escapebrace.in \ + escapebrace.ok \ +@@ -1486,7 +1489,7 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 \ ++ dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 elemnew4 \ + errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ +diff --git a/test/Makefile.in b/test/Makefile.in +index 080abda..a9cf435 100644 +--- a/test/Makefile.in ++++ b/test/Makefile.in +@@ -556,6 +556,9 @@ EXTRA_DIST = \ + elemnew2.ok \ + elemnew3.awk \ + elemnew3.ok \ ++ elemnew4.awk \ ++ elemnew4.in \ ++ elemnew4.ok \ + escapebrace.awk \ + escapebrace.in \ + escapebrace.ok \ +@@ -1754,7 +1757,7 @@ GAWK_EXT_TESTS = \ + binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \ + clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \ + dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 \ +- dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 \ ++ dfacheck1 dumpvars elemnew1 elemnew2 elemnew3 elemnew4 \ + errno exit fieldwdth forcenum fpat1 fpat2 \ + fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \ + functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \ +@@ -4497,6 +4500,11 @@ elemnew3: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew4: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@ + @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +diff --git a/test/Maketests b/test/Maketests +index f7e749c..c868046 100644 +--- a/test/Maketests ++++ b/test/Maketests +@@ -1447,6 +1447,11 @@ elemnew3: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ++elemnew4: ++ @echo $@ ++ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ++ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ++ + exit: + @echo $@ + @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +diff --git a/test/elemnew4.awk b/test/elemnew4.awk +new file mode 100644 +index 0000000..af38469 +--- /dev/null ++++ b/test/elemnew4.awk +@@ -0,0 +1,441 @@ ++#!/bin/awk -f ++# SPDX-License-Identifier: GPL-2.0 ++# gen-insn-attr-x86.awk: Instruction attribute table generator ++# Written by Masami Hiramatsu <mhiramat@redhat.com> ++# ++# Usage: awk -f gen-insn-attr-x86.awk x86-opcode-map.txt > inat-tables.c ++ ++# Awk implementation sanity check ++function check_awk_implement() { ++ if (sprintf("%x", 0) != "0") ++ return "Your awk has a printf-format problem." ++ return "" ++} ++ ++# Clear working vars ++function clear_vars() { ++ delete table ++ delete lptable2 ++ delete lptable1 ++ delete lptable3 ++ eid = -1 # escape id ++ gid = -1 # group id ++ aid = -1 # AVX id ++ tname = "" ++} ++ ++BEGIN { ++ # Implementation error checking ++ awkchecked = check_awk_implement() ++ if (awkchecked != "") { ++ print "Error: " awkchecked > "/dev/stderr" ++ print "Please try to use gawk." > "/dev/stderr" ++ exit 1 ++ } ++ ++ # Setup generating tables ++ print "/* x86 opcode map generated from x86-opcode-map.txt */" ++ print "/* Do not change this code. */\n" ++ ggid = 1 ++ geid = 1 ++ gaid = 0 ++ delete etable ++ delete gtable ++ delete atable ++ ++ opnd_expr = "^A-Za-z/" ++ ext_expr = "^\\(" ++ sep_expr = "^\\|$" ++ group_expr = "^Grp0-9A-Za-z+" ++ ++ imm_expr = "^IJAOLa-z" ++ imm_flag"Ib" = "INAT_MAKE_IMM(INAT_IMM_BYTE)" ++ imm_flag"Jb" = "INAT_MAKE_IMM(INAT_IMM_BYTE)" ++ imm_flag"Iw" = "INAT_MAKE_IMM(INAT_IMM_WORD)" ++ imm_flag"Id" = "INAT_MAKE_IMM(INAT_IMM_DWORD)" ++ imm_flag"Iq" = "INAT_MAKE_IMM(INAT_IMM_QWORD)" ++ imm_flag"Ap" = "INAT_MAKE_IMM(INAT_IMM_PTR)" ++ imm_flag"Iz" = "INAT_MAKE_IMM(INAT_IMM_VWORD32)" ++ imm_flag"Jz" = "INAT_MAKE_IMM(INAT_IMM_VWORD32)" ++ imm_flag"Iv" = "INAT_MAKE_IMM(INAT_IMM_VWORD)"
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2