gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-188


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1886-gf34cb4d
Date: Sun, 3 Jul 2016 14:59:06 +0000 (UTC)

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, feature/fixtype has been updated
       via  f34cb4d3ef340a58dae88f426543c05c4e09f6dd (commit)
      from  279a0d6476c4d403e1038a01d04c4b0cf2fd2f75 (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=f34cb4d3ef340a58dae88f426543c05c4e09f6dd

commit f34cb4d3ef340a58dae88f426543c05c4e09f6dd
Author: Andrew J. Schorr <address@hidden>
Date:   Sun Jul 3 10:58:31 2016 -0400

    Fix bug where STRING flag was disabled during record reconstruction, and 
add test case.

diff --git a/ChangeLog b/ChangeLog
index e68b1be..e50324d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-03         Andrew J. Schorr     <address@hidden>
+
+       * field.c (rebuild_record): Do not turn off the STRING flag when
+       copying a FIELD node, and issue a warning if MALLOC is enabled.
+
 2016-07-01         Arnold D. Robbins     <address@hidden>
 
        * array.c (value_info): Print something reasonable when stfmt
diff --git a/field.c b/field.c
index 931bafc..5e5a351 100644
--- a/field.c
+++ b/field.c
@@ -216,7 +216,11 @@ rebuild_record()
                                }
                        } else {
                                *n = *r;
-                               n->flags &= ~(MALLOC|STRING);
+                               if (n->flags & MALLOC) {
+                                       /* unexpected, since FIELD is on! */
+                                       warning(_("invalid flags combination 
`%s' detected while rebuilding record; please file a bug report."), 
flags2str(n->flags));
+                                       n->flags &= ~MALLOC;
+                               }
                        }
 
                        n->stptr = cops;
diff --git a/test/ChangeLog b/test/ChangeLog
index d495e57..8b4d70e 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-03         Andrew J. Schorr     <address@hidden>
+
+       * Makefile.am (rebuild): New test.
+       * rebuild.awk, rebuild.in, rebuild.ok: New files.
+
 2016-07-01         Arnold D. Robbins     <address@hidden>
 
        * arrayind1.awk, arrayind1.ok: Comment out prints to stderr to
diff --git a/test/Makefile.am b/test/Makefile.am
index 499107c..3a51b3f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -854,6 +854,9 @@ EXTRA_DIST = \
        rebuf.awk \
        rebuf.in \
        rebuf.ok \
+       rebuild.awk \
+       rebuild.in \
+       rebuild.ok \
        redfilnm.awk \
        redfilnm.in \
        redfilnm.ok \
@@ -1161,7 +1164,7 @@ BASIC_TESTS = \
        paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \
        pcntplus posix2008sub prdupval prec printf0 printf1 printfchar prmarscl 
prmreuse \
        prt1eval prtoeval \
-       rand randtest range1 readbuf rebrackloc rebt8b1 redfilnm \
+       rand randtest range1 readbuf rebrackloc rebt8b1 rebuild redfilnm \
        regeq regexpbrack regexpbrack2 \
        regexprange regrange reindops \
        reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 
rstest2 \
diff --git a/test/Makefile.in b/test/Makefile.in
index be42a25..2906432 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1111,6 +1111,9 @@ EXTRA_DIST = \
        rebuf.awk \
        rebuf.in \
        rebuf.ok \
+       rebuild.awk \
+       rebuild.in \
+       rebuild.ok \
        redfilnm.awk \
        redfilnm.in \
        redfilnm.ok \
@@ -1417,7 +1420,7 @@ BASIC_TESTS = \
        paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \
        pcntplus posix2008sub prdupval prec printf0 printf1 printfchar prmarscl 
prmreuse \
        prt1eval prtoeval \
-       rand randtest range1 readbuf rebrackloc rebt8b1 redfilnm \
+       rand randtest range1 readbuf rebrackloc rebt8b1 rebuild redfilnm \
        regeq regexpbrack regexpbrack2 \
        regexprange regrange reindops \
        reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 
rstest2 \
@@ -3504,6 +3507,11 @@ rebt8b1:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+rebuild:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 regeq:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index f42ecdc..525a44d 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -752,6 +752,11 @@ rebt8b1:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+rebuild:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 regeq:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/rebuild.awk b/test/rebuild.awk
new file mode 100644
index 0000000..7320f19
--- /dev/null
+++ b/test/rebuild.awk
@@ -0,0 +1,5 @@
+{
+       $1 = "test"
+       print $0
+       print typeof($2)
+}
diff --git a/test/rebuild.in b/test/rebuild.in
new file mode 100644
index 0000000..b2901ea
--- /dev/null
+++ b/test/rebuild.in
@@ -0,0 +1 @@
+a b
diff --git a/test/rebuild.ok b/test/rebuild.ok
new file mode 100644
index 0000000..2963527
--- /dev/null
+++ b/test/rebuild.ok
@@ -0,0 +1,2 @@
+test b
+strnum

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

Summary of changes:
 ChangeLog                         |    5 +++++
 field.c                           |    6 +++++-
 test/ChangeLog                    |    5 +++++
 test/Makefile.am                  |    5 ++++-
 test/Makefile.in                  |   10 +++++++++-
 test/Maketests                    |    5 +++++
 test/rebuild.awk                  |    5 +++++
 test/rebuild.in                   |    1 +
 test/{arrayind2.ok => rebuild.ok} |    2 +-
 9 files changed, 40 insertions(+), 4 deletions(-)
 create mode 100644 test/rebuild.awk
 create mode 100644 test/rebuild.in
 copy test/{arrayind2.ok => rebuild.ok} (50%)


hooks/post-receive
-- 
gawk



reply via email to

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