aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-01-14 20:53:39 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-01-14 20:53:39 +0200
commit51fd7a034cb931b730d98e513a37240d1696bcc4 (patch)
tree9352ed414dbed1aa45fbab3c96e5688f5c5b54c0
parentf6d1d7cd12cfdf953ecfe387e8d120cc48ae9a57 (diff)
parentfec67185e69458b550c5f8c8591176d715134e33 (diff)
downloadegawk-51fd7a034cb931b730d98e513a37240d1696bcc4.tar.gz
egawk-51fd7a034cb931b730d98e513a37240d1696bcc4.tar.bz2
egawk-51fd7a034cb931b730d98e513a37240d1696bcc4.zip
Merge branch 'gawk-4.1-stable'
-rw-r--r--ChangeLog43
-rw-r--r--doc/ChangeLog10
-rw-r--r--eval.c2
-rw-r--r--test/ChangeLog11
-rw-r--r--test/Makefile.am4
-rw-r--r--test/Makefile.in9
-rw-r--r--test/Maketests5
-rw-r--r--test/aryprm9.awk16
-rw-r--r--test/aryprm9.ok0
9 files changed, 77 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index b9cffeda..bf257322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-01-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * eval.c (r_get_lhs): If original array was Node_var_new,
+ assign value that is dupnode of Nnull_string and not
+ Nnull_string directly. Fixes core dump reported by
+ ruyk <Lonely.ruyk@mail.ru>.
+
+ Unrelated:
+
+ * ChangeLog: Cleanup spurious extra whitespace.
+
2016-01-03 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac (GAWK_AC_LINUX_ALPHA): Remove call.
@@ -55,7 +66,7 @@
is false. Fixes a problem reported by Hanno Boeck <hanno@hboeck.de>.
Unrelated:
-
+
* dfa.c: Sync with GNU grep.
2015-10-25 Arnold D. Robbins <arnold@skeeve.com>
@@ -461,7 +472,7 @@
add check that time_t is > 0 --- means we're assigning a negative value
to an unsigned time_t. Thanks again to Glaudiston Gomes da Silva
<glaudistong@gmail.com>.
-
+
If localtime() or gmtime() return NULL, return a null string.
Thanks to Andrew Schorr.
@@ -1510,7 +1521,7 @@
* builtin.c (format_tree): Don't need to check return value of
wctombr for -2. Thanks to Eli Zaretskii for pointing this out.
-
+
Unrelated:
* gawkapi.h: Fix doc for API get_record - errcode needs to
@@ -3021,7 +3032,7 @@
* awk.h (SRCFILE): New field fini_func.
* ext.c (load_ext): Takes an additional argument to look up and
- save the clean up routine in SRCFILE struct.
+ save the clean up routine in SRCFILE struct.
(INIT_FUNC, FINI_FUNC): Defines for default init and fini routine
names.
(do_ext): Use default for the name of the init or fini routine if
@@ -3036,8 +3047,8 @@
Unrelated:
- * interpret.h (Op_arrayfor_init): Use assoc_length for array size.
-
+ * interpret.h (Op_arrayfor_init): Use assoc_length for array size.
+
2012-04-19 John Haque <j.eh@mchsi.com>
Enhanced array interface to support transparent implementation
@@ -3063,7 +3074,7 @@
(null_array_func): Add length and store routine entries.
* str_array.c (str_array_func): Same.
* cint_array.c (cint_array_func): Same.
- * int_array.c (int_array_func): Same.
+ * int_array.c (int_array_func): Same.
* eval.c (optypetab): Add Op_subscript_assign.
* profile.c (pprint): Add case Op_subscript_assign.
* interpret.h (set_array, set_idx): New variables to keep track
@@ -4246,7 +4257,7 @@
* main.c: Change --arbitrary-precision to --bignum.
2012-04-02 John Haque <j.eh@mchsi.com>
-
+
Add support for arbitrary-precision arithmetic.
* mpfr.c: New file.
@@ -4277,7 +4288,7 @@
* eval.c (register_exec_hook): New function to manage interpreter hooks.
(num_exec_hook, pre_execute, post_execute): New and adjusted definitions.
(h_interpret): Renamed from debug_interpret.
- (init_interpret): Changed to use the new name.
+ (init_interpret): Changed to use the new name.
(flags2str): New entries for MPFN and MPZN.
(cmp_nodes): Reworked to use seperate routine for numeric comparisons.
(set_IGNORECASE, set_BINMODE, set_LINT, update_NR, update_FNR,
@@ -4423,7 +4434,7 @@
2012-01-13 Arnold D. Robbins <arnold@skeeve.com>
- * dfa.c [is_valid_unibtye_character]: Fix from GNU grep to
+ * dfa.c [is_valid_unibtye_character]: Fix from GNU grep to
bug reported by me from Scott Deifik for DJGPP.
2012-01-03 Arnold D. Robbins <arnold@skeeve.com>
@@ -4767,7 +4778,7 @@
(do_traditional, do_posix, do_intervals, do_intl,
do_non_decimal_data, do_profiling, do_dump_vars,
do_tidy_mem, do_sandbox, do_lint,
- do_lint_old): Defined as macros.
+ do_lint_old): Defined as macros.
* main.c: Remove definitions of the do_XX variables. Add
do_flags definition.
* debug.c (execute_code, do_eval, parse_condition): Save
@@ -4799,7 +4810,7 @@
(Node_ahash, NUMIND): Nuked.
* eval.c (r_interpret): Adjust cases Op_subscript,
Op_subscript_lhs, Op_store_var and Op_arrayfor_incr.
- * node.c (dupnode, unref): Removed code related to Node_ahash.
+ * node.c (dupnode, unref): Removed code related to Node_ahash.
* str_array.c: New file to handle array with string indices.
* int_array.c: New file to handle array with integer indices.
* cint_array.c: New file. Special handling of arrays with
@@ -4852,7 +4863,7 @@
cases Op_K_getline, Op_after_beginfile, Op_after_endfile,
Op_newfile and Op_K_exit.
* io.c (after_beginfile): When skipping a file using nextfile,
- return zero in case there was an error opening the file.
+ return zero in case there was an error opening the file.
(has_endfile): Nuke global variable.
(inrec): Add a second argument to pass errno to the calling
routine.
@@ -4933,7 +4944,7 @@
2011-07-15 John Haque <j.eh@mchsi.com>
* awk.h (Op_sub_builtin): New opcode.
- (GSUB, GENSUB, AFTER_ASSIGN, LITERAL): New flags for
+ (GSUB, GENSUB, AFTER_ASSIGN, LITERAL): New flags for
Op_sub_builtin.
* awkgram.y (struct tokentab): Change opcode to Op_sub_builtin
for sub, gsub and gensub.
@@ -4941,7 +4952,7 @@
* builtin.c (do_sub, do_gsub, do_gensub): Nuke.
(sub_common): Renamed to do_sub. Relocate gensub argument
handling code from do_gensub to here; Simplify the code a
- little bit.
+ little bit.
* eval.c (r_interpret): Handle Op_sub_builtin. Avoid field
re-splitting or $0 rebuilding if (g)sub target string is
a field and no substitutions were done.
@@ -4964,7 +4975,7 @@
2011-07-15 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: Typo fix: "loner" --> longer. Thanks to Nelson Beebe.
- * builtin.c (efwrite): Fix flushing test back to what it was
+ * builtin.c (efwrite): Fix flushing test back to what it was
in 3.1.8. Thanks to Strefil <strefil@yandex.ru> for the problem
report.
* configure.ac: Bump version to 4.0.0a for stable branch.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index f6e1b6bc..c4d35b33 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * ChangeLog: Remove spurious whitespace.
+
2016-01-13 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in (Array Sorting Functions): Add an example of
@@ -127,7 +131,7 @@
2015-06-13 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Comment out exercise 10.3, since the answer
- is included in the text. Thanks to Antonio Colombo
+ is included in the text. Thanks to Antonio Colombo
for pointing this out.
2015-06-12 Arnold D. Robbins <arnold@skeeve.com>
@@ -774,7 +778,7 @@
2014-05-29 Arnold D. Robbins <arnold@skeeve.com>
- * gawktexi.in: Remove some obsolete bits, fix up some other
+ * gawktexi.in: Remove some obsolete bits, fix up some other
minor stuff.
2014-05-27 Arnold D. Robbins <arnold@skeeve.com>
@@ -1511,7 +1515,7 @@
* gawk.texi, gawk.1: Replace references to dlload with dl_load.
But much more work needs to be done on the docs.
-
+
2012-05-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
* gawk.texi, gawk.1: Document new -i option, and describe new default
diff --git a/eval.c b/eval.c
index cf4de1f4..18d441b3 100644
--- a/eval.c
+++ b/eval.c
@@ -1157,7 +1157,7 @@ r_get_lhs(NODE *n, bool reference)
array_vname(n));
if (n->orig_array->type != Node_var) {
n->orig_array->type = Node_var;
- n->orig_array->var_value = Nnull_string;
+ n->orig_array->var_value = dupnode(Nnull_string);
}
/* fall through */
case Node_var_new:
diff --git a/test/ChangeLog b/test/ChangeLog
index d18c6173..b05c2896 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,12 @@
+2016-01-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (aryprm9): New test.
+ * aryprm9.awk, aryprm9.ok: New files.
+
+ Unrelated:
+
+ * ChangeLog: Remove spurious whitespace.
+
2015-12-27 Arnold D. Robbins <arnold@skeeve.com>
These came in from gawk-4.1-stable:
@@ -131,7 +140,7 @@
2015-05-21 Arnold D. Robbins <arnold@skeeve.com>
- * fts.awk: Really remove atime from the output.
+ * fts.awk: Really remove atime from the output.
This avoids spurious failures on heavily loaded systems.
* Makefile.am: Add list of needed locales to "inadequate locale
diff --git a/test/Makefile.am b/test/Makefile.am
index b9eb6739..02748c18 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -93,6 +93,8 @@ EXTRA_DIST = \
aryprm7.ok \
aryprm8.awk \
aryprm8.ok \
+ aryprm9.awk \
+ aryprm9.ok \
arysubnm.awk \
arysubnm.ok \
asgext.awk \
@@ -1072,7 +1074,7 @@ BASIC_TESTS = \
addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \
arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \
- aryprm8 arysubnm asgext awkpath \
+ aryprm8 aryprm9 arysubnm asgext awkpath \
back89 backgsub badassign1 badbuild \
callparam childin clobber closebad clsflnam compare compare2 concat1 concat2 \
concat3 concat4 convfmt \
diff --git a/test/Makefile.in b/test/Makefile.in
index df6c576f..f76b4d59 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -350,6 +350,8 @@ EXTRA_DIST = \
aryprm7.ok \
aryprm8.awk \
aryprm8.ok \
+ aryprm9.awk \
+ aryprm9.ok \
arysubnm.awk \
arysubnm.ok \
asgext.awk \
@@ -1328,7 +1330,7 @@ BASIC_TESTS = \
addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \
arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \
- aryprm8 arysubnm asgext awkpath \
+ aryprm8 aryprm9 arysubnm asgext awkpath \
back89 backgsub badassign1 badbuild \
callparam childin clobber closebad clsflnam compare compare2 concat1 concat2 \
concat3 concat4 convfmt \
@@ -2740,6 +2742,11 @@ aryprm8:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+aryprm9:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
arysubnm:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 689dcdc9..f1ffdf97 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -100,6 +100,11 @@ aryprm8:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+aryprm9:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
arysubnm:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/aryprm9.awk b/test/aryprm9.awk
new file mode 100644
index 00000000..004e3c34
--- /dev/null
+++ b/test/aryprm9.awk
@@ -0,0 +1,16 @@
+#!/usr/bin/gawk -f
+BEGIN {
+
+ for (i = 0; i < 100; i++)
+ func_exec()
+}
+
+function func_exec(opaque)
+{
+ func_a(1, opaque) #set additional argument, not expected by fname
+}
+
+function func_a(a, b, loc1, loc2)
+{
+ b = 0 #unref Nnull_string
+}
diff --git a/test/aryprm9.ok b/test/aryprm9.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/aryprm9.ok