gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-990


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-990-ge331f49
Date: Mon, 7 Nov 2016 19:22:59 +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, gawk-4.1-stable has been updated
       via  e331f49edafc56bf8f32cc82adacd6c109666ad1 (commit)
      from  e886bf34a4e42095824a2b14c40cb19efa80390f (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=e331f49edafc56bf8f32cc82adacd6c109666ad1

commit e331f49edafc56bf8f32cc82adacd6c109666ad1
Author: Arnold D. Robbins <address@hidden>
Date:   Mon Nov 7 21:22:47 2016 +0200

    Improve valgrind scan.

diff --git a/test/ChangeLog b/test/ChangeLog
index 280a80a..9006d33 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,11 @@
+2016-11-07         Arnold D. Robbins     <address@hidden>
+
+       * valgrind.awk: New file. Based on original valgrind-scan code.
+       Having it in a separate file makes it easier to adjust.
+       Commented out several checks that just produced false positives.
+       Add check for invalid read and write.
+       * Makefile.am (valgrind-scan): Use valgrind.awk.
+
 2016-08-25         Arnold D. Robbins     <address@hidden>
 
        * 4.1.4: Release tar ball made.
diff --git a/test/Makefile.am b/test/Makefile.am
index e27dcf6..a9d247e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2228,17 +2228,7 @@ diffout:
 # convenient way to scan valgrind results for errors
 valgrind-scan:
        @echo "Scanning valgrind log files for problems:"
-       @$(AWK) '\
-       function show() {if (cmd) {printf "%s: %s\n",FILENAME,cmd; cmd = ""}; \
-         printf "\t%s\n",$$0}; \
-       {$$1 = ""}; \
-       $$2 == "Command:" {incmd = 1; $$2 = ""; cmd = $$0; next}; \
-       incmd {if (/Parent PID:/) incmd = 0; else {cmd = (cmd $$0); next}}; \
-       /ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ {show()}; \
-       /definitely lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \
-       /possibly lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \
-       / suppressed:/ && !/: 0 bytes in 0 blocks/ {show()}; \
-       ' log.[0-9]*
+       @$(AWK) -f "$(srcdir)"/valgrind.awk log.[0-9]*
 
 # This target is for testing with electric fence.
 efence:
diff --git a/test/Makefile.in b/test/Makefile.in
index 0a5595b..af45cc3 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -4150,17 +4150,7 @@ diffout:
 # convenient way to scan valgrind results for errors
 valgrind-scan:
        @echo "Scanning valgrind log files for problems:"
-       @$(AWK) '\
-       function show() {if (cmd) {printf "%s: %s\n",FILENAME,cmd; cmd = ""}; \
-         printf "\t%s\n",$$0}; \
-       {$$1 = ""}; \
-       $$2 == "Command:" {incmd = 1; $$2 = ""; cmd = $$0; next}; \
-       incmd {if (/Parent PID:/) incmd = 0; else {cmd = (cmd $$0); next}}; \
-       /ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ {show()}; \
-       /definitely lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \
-       /possibly lost:/ && !/: 0 bytes in 0 blocks/ {show()}; \
-       / suppressed:/ && !/: 0 bytes in 0 blocks/ {show()}; \
-       ' log.[0-9]*
+       @$(AWK) -f "$(srcdir)"/valgrind.awk log.[0-9]*
 
 # This target is for testing with electric fence.
 efence:
diff --git a/test/valgrind.awk b/test/valgrind.awk
new file mode 100644
index 0000000..95699da
--- /dev/null
+++ b/test/valgrind.awk
@@ -0,0 +1,43 @@
+function show()
+{
+       error_count++
+       if (cmd) {
+               printf "%s: %s\n", FILENAME, cmd
+               cmd = ""
+       }
+       printf "\t%s\n",$0
+}
+
+FNR == 1 {
+       error_count = 0
+}
+
+{ $1 = "" }
+
+$2 == "Command:" {
+       incmd = 1
+       $2 = ""
+       cmd = $0
+       next
+}
+
+incmd {
+       if (/Parent PID:/)
+               incmd = 0
+       else {
+               cmd = (cmd $0)
+               next
+       }
+}
+
+/ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ && error_count > 0 {
+       show()
+}
+
+/definitely lost:/ && !/: 0 bytes in 0 blocks/         { show() }
+
+# /possibly lost:/ && !/: 0 bytes in 0 blocks/         { show() }
+
+# / suppressed:/ && !/: 0 bytes in 0 blocks/           { show() }
+
+/[Ii]nvalid (read|write)/                              { show() }

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

Summary of changes:
 test/ChangeLog    |    8 ++++++++
 test/Makefile.am  |   12 +-----------
 test/Makefile.in  |   12 +-----------
 test/valgrind.awk |   43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+), 22 deletions(-)
 create mode 100644 test/valgrind.awk


hooks/post-receive
-- 
gawk



reply via email to

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