]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added extra filtering for the stderr output of malloc_free_fill such that the output...
authorBart Van Assche <bvanassche@acm.org>
Fri, 27 Jun 2008 07:33:18 +0000 (07:33 +0000)
committerBart Van Assche <bvanassche@acm.org>
Fri, 27 Jun 2008 07:33:18 +0000 (07:33 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8285

memcheck/tests/Makefile.am
memcheck/tests/filter_malloc_free_fill [new file with mode: 0755]
memcheck/tests/malloc_free_fill.stderr.exp [moved from memcheck/tests/malloc_free_fill.stderr.exp-glibc27-amd64 with 98% similarity]
memcheck/tests/malloc_free_fill.stderr.exp-glibc25-amd64 [deleted file]
memcheck/tests/malloc_free_fill.stderr.exp-glibc25-x86 [deleted file]
memcheck/tests/malloc_free_fill.vgtest

index 737a439ccfd4b2ee97c6b9819c0c261cd1272e0a..90229131ee82d19279859bee03c5ab16244afbc7 100644 (file)
@@ -75,8 +75,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
        lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \
        mallinfo.stderr.exp mallinfo.vgtest \
        malloc_free_fill.vgtest malloc_free_fill.stdout.exp \
-       malloc_free_fill.stderr.exp-glibc25-amd64 \
-       malloc_free_fill.stderr.exp-glibc25-x86 \
+       malloc_free_fill.stderr.exp \
        malloc_usable.stderr.exp malloc_usable.vgtest \
        malloc1.stderr.exp malloc1.vgtest \
        malloc2.stderr.exp malloc2.vgtest \
diff --git a/memcheck/tests/filter_malloc_free_fill b/memcheck/tests/filter_malloc_free_fill
new file mode 100755 (executable)
index 0000000..9eecf58
--- /dev/null
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+./filter_stderr |
+sed -e 's|^Use of uninitialised value of size [0-9]*$|Use of uninitialised value of size .|g' \
+    -e 's|^    at 0x\.\.\.\.\.\.\.\.: _itoa_word (in /\.\.\.libc\.\.\.)$|    at 0x........: (within /...libc...)|g'
similarity index 98%
rename from memcheck/tests/malloc_free_fill.stderr.exp-glibc27-amd64
rename to memcheck/tests/malloc_free_fill.stderr.exp
index 3aaeebde72c2f87c5092f5ca6e5a42de559a29a6..5f6f019411064b81d0939fc07ff2ac37812a51a7 100644 (file)
@@ -1,6 +1,6 @@
 
 test simple malloc/free:
-Use of uninitialised value of size 8
+Use of uninitialised value of size .
    at 0x........: (within /...libc...)
    by 0x........: ...
    by 0x........: ...
diff --git a/memcheck/tests/malloc_free_fill.stderr.exp-glibc25-amd64 b/memcheck/tests/malloc_free_fill.stderr.exp-glibc25-amd64
deleted file mode 100644 (file)
index 271ec0b..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-
-test simple malloc/free:
-Use of uninitialised value of size 8
-   at 0x........: _itoa_word (in /...libc...)
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: main (malloc_free_fill.c:17)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: _itoa_word (in /...libc...)
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: main (malloc_free_fill.c:17)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: vfprintf (in /...libc...)
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: main (malloc_free_fill.c:17)
-(should be malloc-filled)     a[4] = 55555555
-
-Invalid read of size 4
-   at 0x........: main (malloc_free_fill.c:20)
- Address 0x........ is 20 bytes inside a block of size 40 free'd
-   at 0x........: free (vg_replace_malloc.c:...)
-   by 0x........: main (malloc_free_fill.c:19)
-(should be free-filled)       a[5] = 77777777
-test realloc-larger:
-(should be malloc-filled)    r[25] = 55555555
-
-Invalid read of size 4
-   at 0x........: main (malloc_free_fill.c:33)
- Address 0x........ is 104 bytes inside a block of size 120 free'd
-   at 0x........: realloc (vg_replace_malloc.c:...)
-   by 0x........: main (malloc_free_fill.c:31)
-(should be free-filled)   oldr[26] = 77777777
-(should be malloc-filled)    r[35] = 55555555
-test realloc-smaller:
-(should be malloc-filled)    r[25] = 55555555
-
-Invalid read of size 4
-   at 0x........: main (malloc_free_fill.c:49)
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-(should be free-filled)   oldr[26] = 77777777
-test calloc:
-(should be zero)             a[42] = 0
-
-ERROR SUMMARY: 67 errors from 6 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 6 allocs, 6 frees, 920 bytes allocated.
-For a detailed leak analysis,  rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
-Use --track-origins=yes to see where uninitialised values come from
diff --git a/memcheck/tests/malloc_free_fill.stderr.exp-glibc25-x86 b/memcheck/tests/malloc_free_fill.stderr.exp-glibc25-x86
deleted file mode 100644 (file)
index 8aabc5c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-
-test simple malloc/free:
-Use of uninitialised value of size 4
-   at 0x........: _itoa_word (in /...libc...)
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: main (malloc_free_fill.c:17)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: _itoa_word (in /...libc...)
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: main (malloc_free_fill.c:17)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: vfprintf (in /...libc...)
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: ...
-   by 0x........: main (malloc_free_fill.c:17)
-(should be malloc-filled)     a[4] = 55555555
-
-Invalid read of size 4
-   at 0x........: main (malloc_free_fill.c:20)
- Address 0x........ is 20 bytes inside a block of size 40 free'd
-   at 0x........: free (vg_replace_malloc.c:...)
-   by 0x........: main (malloc_free_fill.c:19)
-(should be free-filled)       a[5] = 77777777
-test realloc-larger:
-(should be malloc-filled)    r[25] = 55555555
-
-Invalid read of size 4
-   at 0x........: main (malloc_free_fill.c:33)
- Address 0x........ is 104 bytes inside a block of size 120 free'd
-   at 0x........: realloc (vg_replace_malloc.c:...)
-   by 0x........: main (malloc_free_fill.c:31)
-(should be free-filled)   oldr[26] = 77777777
-(should be malloc-filled)    r[35] = 55555555
-test realloc-smaller:
-(should be malloc-filled)    r[25] = 55555555
-
-Invalid read of size 4
-   at 0x........: main (malloc_free_fill.c:49)
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-(should be free-filled)   oldr[26] = 77777777
-test calloc:
-(should be zero)             a[42] = 0
-
-ERROR SUMMARY: 67 errors from 6 contexts (suppressed: 0 from 0)
-malloc/free: in use at exit: 0 bytes in 0 blocks.
-malloc/free: 6 allocs, 6 frees, 920 bytes allocated.
-For a detailed leak analysis,  rerun with: --leak-check=yes
-For counts of detected errors, rerun with: -v
-Use --track-origins=yes to see where uninitialised values come from
index ba143818533f23a01d43edeb534f976b479433f0..5ae6ffb8187dedcb4c5678d40936db1a7d08adac 100644 (file)
@@ -1,2 +1,3 @@
 prog: malloc_free_fill
 vgopts: --malloc-fill=0x55 --free-fill=0x77
+stderr_filter: filter_malloc_free_fill