[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5607-g05e85466
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5607-g05e85466 |
Date: |
Wed, 5 Feb 2025 13:12:17 -0500 (EST) |
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.3-stable has been updated
via 05e85466a2db546a65e2514e8a10b1fbf977ff44 (commit)
from 28c67338510f6ca025f4be8451dd72fbb690e543 (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=05e85466a2db546a65e2514e8a10b1fbf977ff44
commit 05e85466a2db546a65e2514e8a10b1fbf977ff44
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Wed Feb 5 20:11:49 2025 +0200
Fix a memory leak in indirect calls.
diff --git a/ChangeLog b/ChangeLog
index 7d4a69cd..55efff0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2025-02-05 Arnold D. Robbins <arnold@skeeve.com>
+
+ * node.c (r_unref): For Node_var_new, free the vname.
+
2025-02-05 Arnold D. Robbins <arnold@skeeve.com>
Stylistic cleanups and small code cleanups.
diff --git a/node.c b/node.c
index 550edc2e..69b4fad6 100644
--- a/node.c
+++ b/node.c
@@ -551,6 +551,10 @@ r_unref(NODE *tmp)
if (tmp->type == Node_elem_new && tmp->elemnew_vname != NULL)
efree(tmp->elemnew_vname);
+ else if ((tmp->type == Node_var || tmp->type == Node_var_new)
+ && tmp->vname != NULL)
+ efree(tmp->vname);
+
free_wstr(tmp);
freenode(tmp);
}
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 437bb55e..5e5d71a5 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2025-02-05 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated.
+
2025-01-23 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 2e6435db..2f13281a 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -225,6 +225,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
delmessy indirectbuiltin3 indirectbuiltin4 memleak2 \
+ memleak3 \
typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
@@ -3715,6 +3716,11 @@ memleak2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+memleak3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typeof4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index cd864399..77b3d2c6 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2025-02-05 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRADIST): New test, memleak3.
+ * memleak3.awk, memleak3.ok: New files.
+
2025-02-03 Cristian Ioneci <mekanofox@astropostale.com>
* Makefile.am (EXTRADIST): New tests: ar2fn_elnew_sc, ar2fn_elnew_sc2,
diff --git a/test/Makefile.am b/test/Makefile.am
index c292383d..8b1ebeb9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -815,6 +815,8 @@ EXTRA_DIST = \
memleak.ok \
memleak2.awk \
memleak2.ok \
+ memleak3.awk \
+ memleak3.ok \
messages.awk \
minusstr.awk \
minusstr.ok \
@@ -1621,6 +1623,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
delmessy indirectbuiltin3 indirectbuiltin4 memleak2 \
+ memleak3 \
typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
diff --git a/test/Makefile.in b/test/Makefile.in
index 70e437a3..326b35c1 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1079,6 +1079,8 @@ EXTRA_DIST = \
memleak.ok \
memleak2.awk \
memleak2.ok \
+ memleak3.awk \
+ memleak3.ok \
messages.awk \
minusstr.awk \
minusstr.ok \
@@ -1885,6 +1887,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
delmessy indirectbuiltin3 indirectbuiltin4 memleak2 \
+ memleak3 \
typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
@@ -5553,6 +5556,11 @@ memleak2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+memleak3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typeof4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 77a02181..15dd7bbf 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -2392,6 +2392,11 @@ memleak2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+memleak3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typeof4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/memleak3.awk b/test/memleak3.awk
new file mode 100644
index 00000000..d09f97bd
--- /dev/null
+++ b/test/memleak3.awk
@@ -0,0 +1,4 @@
+BEGIN {
+ f = "awk::length"
+ @f(thearg)
+}
diff --git a/test/memleak3.ok b/test/memleak3.ok
new file mode 100644
index 00000000..e69de29b
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
node.c | 4 ++++
pc/ChangeLog | 4 ++++
pc/Makefile.tst | 6 ++++++
test/ChangeLog | 5 +++++
test/Makefile.am | 3 +++
test/Makefile.in | 8 ++++++++
test/Maketests | 5 +++++
test/memleak3.awk | 4 ++++
test/{arrayprm2.ok => memleak3.ok} | 0
10 files changed, 43 insertions(+)
create mode 100644 test/memleak3.awk
copy test/{arrayprm2.ok => memleak3.ok} (100%)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5607-g05e85466,
Arnold Robbins <=