gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4008-gf60ced6


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4008-gf60ced6
Date: Fri, 3 Jul 2020 04:16:20 -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  f60ced696bc752cdc1a1f45ce2cc9d6149be7087 (commit)
      from  c93888d0bc6a1170edaac3f8cee4e13aac2abda9 (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=f60ced696bc752cdc1a1f45ce2cc9d6149be7087

commit f60ced696bc752cdc1a1f45ce2cc9d6149be7087
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Fri Jul 3 11:16:02 2020 +0300

    Fix double free error with -M.

diff --git a/ChangeLog b/ChangeLog
index 394b0ed..efe4abe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-07-03         Arnold D. Robbins     <arnold@skeeve.com>
+
+       Fix a double free error with -M.  Thanks to
+       "NIDE, Naoyuki" <nide@ics.nara-wu.ac.jp> for the report.
+
+       * field.c (clear_mpfr):  New macro, clears MPFR and NUMCUR bits.
+       (reset_record): Use it on the newly copied field values.
+       (purge_record): Add introductory comment since we're in the file.
+
 2020-07-01         Arnold D. Robbins     <arnold@skeeve.com>
 
        * eval.c (posix_compare): Rewrite contributed by
diff --git a/field.c b/field.c
index 0e84447..c21046b 100644
--- a/field.c
+++ b/field.c
@@ -90,6 +90,8 @@ Regexp *FPAT_re_no_case = NULL;
 Regexp *FPAT_regexp = NULL;
 NODE *Null_field = NULL;
 
+#define clear_mpfr(n) ((n)->flags &= ~(MPFN | MPZN | NUMCUR))
+
 /* init_fields --- set up the fields array to start with */
 
 void
@@ -230,6 +232,7 @@ rebuild_record()
                        }
 
                        n->stptr = cops;
+                       clear_mpfr(n);
                        unref(r);
                        fields_arr[i] = n;
                        assert((n->flags & WSTRCUR) == 0);
@@ -347,6 +350,11 @@ reset_record()
        }
 }
 
+/*
+ * purge_record --- throw away the fields, make sure that
+ *     individual nodes remain valid.
+ */
+
 static void
 purge_record()
 {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog | 9 +++++++++
 field.c   | 8 ++++++++
 2 files changed, 17 insertions(+)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]