[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4922-gf4b98a7f
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4922-gf4b98a7f |
Date: |
Tue, 11 Oct 2022 15:48:10 -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.2-stable has been updated
via f4b98a7f0960b6284c158a3af8758b73588a587d (commit)
from 141a9e05f552d30b45e0c66a21e79ca9e7de54e9 (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=f4b98a7f0960b6284c158a3af8758b73588a587d
commit f4b98a7f0960b6284c158a3af8758b73588a587d
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Tue Oct 11 22:47:30 2022 +0300
Fix a lurking bug in --dump-variables implementation.
diff --git a/ChangeLog b/ChangeLog
index 519facfb..d2094eb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-10-11 Arnold D. Robbins <arnold@skeeve.com>
+
+ * symbol.c (get_symbols): Getting variables, use
+ the_table->table_size for the count, not var_count. Bug
+ was tickled when using --dump-var together with persistent
+ memory. (Why didn't valgrind catch this?) Thanks to Hermann
+ Peifer (peifer@gmx.eu) for the report.
+
2022-09-30 Arnold D. Robbins <arnold@skeeve.com>
* interpret.h (r_interpret): For the `push' opcodes with
diff --git a/symbol.c b/symbol.c
index 8c6914fb..f315a483 100644
--- a/symbol.c
+++ b/symbol.c
@@ -467,7 +467,7 @@ get_symbols(SYMBOL_TYPE what, bool sort)
list = assoc_list(the_table, "@unsorted", ASORTI);
/* add three: one for FUNCTAB, one for SYMTAB, and one for a
final NULL */
- emalloc(table, NODE **, (var_count + 1 + 1 + 1) * sizeof(NODE
*), "get_symbols");
+ emalloc(table, NODE **, (the_table->table_size + 1 + 1 + 1) *
sizeof(NODE *), "get_symbols");
for (i = count = 0; i < max; i += 2) {
r = list[i+1];
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
symbol.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4922-gf4b98a7f,
Arnold Robbins <=