summaryrefslogtreecommitdiff
path: root/memcheck
diff options
context:
space:
mode:
authornjn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9>2009-03-16 00:59:17 +0000
committernjn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9>2009-03-16 00:59:17 +0000
commitacdcf542a5f8cafbbfb7c0552fe9a40c457a9387 (patch)
treeabb23ff2930efdd5cfb33b3532ceae6c6f409bba /memcheck
parentb69aca1f8cd04557fa77f2b25a15f4a73c665088 (diff)
- Turn exit_group() into exit() in the Memcheck filter, for greater
determinism and portability. - Update the xml1 .exp files accordingly (getting rid of one which is no longer necessary). - Update origin4-many.stderr.exp accordingly. - Update the handling of scalar_exit_group accordingly. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9421 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'memcheck')
-rw-r--r--memcheck/tests/Makefile.am3
-rwxr-xr-xmemcheck/tests/filter_stderr4
-rw-r--r--memcheck/tests/origin4-many.stderr.exp2
-rw-r--r--memcheck/tests/x86-linux/Makefile.am4
-rw-r--r--memcheck/tests/x86-linux/scalar_exit_group.vgtest1
-rw-r--r--memcheck/tests/xml1.stderr.exp433
-rw-r--r--memcheck/tests/xml1.stderr.exp32 (renamed from memcheck/tests/xml1.stderr.exp2)0
-rw-r--r--memcheck/tests/xml1.stderr.exp642
8 files changed, 11 insertions, 438 deletions
diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am
index 2d7934a3..df608cc0 100644
--- a/memcheck/tests/Makefile.am
+++ b/memcheck/tests/Makefile.am
@@ -172,8 +172,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \
wrap8.stdout.exp2 wrap8.stderr.exp2 \
writev.stderr.exp writev.vgtest \
- xml1.stderr.exp xml1.stderr.exp2 \
- xml1.stderr.exp64 xml1.stdout.exp \
+ xml1.stderr.exp32 xml1.stderr.exp64 xml1.stdout.exp \
xml1.vgtest
check_PROGRAMS = \
diff --git a/memcheck/tests/filter_stderr b/memcheck/tests/filter_stderr
index 6c94b020..3044a158 100755
--- a/memcheck/tests/filter_stderr
+++ b/memcheck/tests/filter_stderr
@@ -16,6 +16,10 @@ sed "s/mc_replace_strmem.c:[0-9]*/mc_replace_strmem.c:.../" |
# Remove the size in "The main thread stack size..." message.
sed "s/The main thread stack size used in this run was [0-9]*/The main thread stack size used in this run was .../" |
+# Replace exit_group() with exit(), because you can get either on Linux
+# depending on the system.
+perl -p -e "s/param exit_group\(status\)/param exit(status)/" |
+
# Stack traces ending in syscalls often cause problems, with lots of libc
# variations: different numbers of entries, line numbers or not depending on
# whether libc debug info is present, 'writev' vs 'do_writev', 'main' vs.
diff --git a/memcheck/tests/origin4-many.stderr.exp b/memcheck/tests/origin4-many.stderr.exp
index 01ae70d5..bef53f13 100644
--- a/memcheck/tests/origin4-many.stderr.exp
+++ b/memcheck/tests/origin4-many.stderr.exp
@@ -46,7 +46,7 @@ Conditional jump or move depends on uninitialised value(s)
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:39)
-Syscall param exit_group(status) contains uninitialised byte(s)
+Syscall param exit(status) contains uninitialised byte(s)
...
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
diff --git a/memcheck/tests/x86-linux/Makefile.am b/memcheck/tests/x86-linux/Makefile.am
index 9f788322..c32296a7 100644
--- a/memcheck/tests/x86-linux/Makefile.am
+++ b/memcheck/tests/x86-linux/Makefile.am
@@ -1,7 +1,9 @@
include $(top_srcdir)/Makefile.tool-tests.am
-noinst_SCRIPTS = filter_stderr
+noinst_SCRIPTS = \
+ filter_scalar_exit_group \
+ filter_stderr
noinst_HEADERS = scalar.h
diff --git a/memcheck/tests/x86-linux/scalar_exit_group.vgtest b/memcheck/tests/x86-linux/scalar_exit_group.vgtest
index 8b0c2b68..9cfa33c0 100644
--- a/memcheck/tests/x86-linux/scalar_exit_group.vgtest
+++ b/memcheck/tests/x86-linux/scalar_exit_group.vgtest
@@ -1,2 +1,3 @@
prog: scalar_exit_group
vgopts: -q
+stderr_filter: filter_scalar_exit_group
diff --git a/memcheck/tests/xml1.stderr.exp b/memcheck/tests/xml1.stderr.exp
deleted file mode 100644
index 5f982d06..00000000
--- a/memcheck/tests/xml1.stderr.exp
+++ /dev/null
@@ -1,433 +0,0 @@
-<?xml version="1.0"?>
-
-<valgrindoutput>
-
-<protocolversion>3</protocolversion>
-
-<preamble>
- <line>...</line>
- <line>...</line>
- <line>...</line>
- <line>...</line>
- <line>...</line>
- <line>...</line>
-</preamble>
-
-<pid>...</pid>
-<ppid>...</ppid>
-<tool>memcheck</tool>
-
-<args>
- <vargv>...</vargv>
- <argv>
- <exe>./xml1</exe>
- </argv>
-</args>
-
-<status>
- <state>RUNNING</state>
- <time>...</time>
-</status>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>InvalidRead</kind>
- <what>Invalid read of size 4</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 40 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>UninitCondition</kind>
- <what>Conditional jump or move depends on uninitialised value(s)</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>UninitValue</kind>
- <what>Use of uninitialised value of size 4</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>InvalidFree</kind>
- <what>Invalid free() / delete / delete[]</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>free</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes inside a block of size 40 free'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>free</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>InvalidFree</kind>
- <what>Invalid free() / delete / delete[]</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>free</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is on thread 1's stack</auxwhat>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>SyscallParam</kind>
- <what>Syscall param exit_group(status) contains uninitialised byte(s)</what>
-</error>
-
-<errorcounts>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
- <pair>
- <count>...</count>
- <unique>0x........</unique>
- </pair>
-</errorcounts>
-
-<status>
- <state>FINISHED</state>
- <time>...</time>
-</status>
-
-<suppcounts>...</suppcounts>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <kind>Leak_DefinitelyLost</kind>
- <what>396 bytes in 1 blocks are definitely lost in loss record ... of ...</what>
- <leakedbytes>396</leakedbytes>
- <leakedblocks>1</leakedblocks>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame3</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame2</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>frame1</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>main</fn>
- <dir>...</dir>
- <file>xml1.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-</valgrindoutput>
-
diff --git a/memcheck/tests/xml1.stderr.exp2 b/memcheck/tests/xml1.stderr.exp32
index 1e3d4bc1..1e3d4bc1 100644
--- a/memcheck/tests/xml1.stderr.exp2
+++ b/memcheck/tests/xml1.stderr.exp32
diff --git a/memcheck/tests/xml1.stderr.exp64 b/memcheck/tests/xml1.stderr.exp64
index 6ca5b82a..c83a95f3 100644
--- a/memcheck/tests/xml1.stderr.exp64
+++ b/memcheck/tests/xml1.stderr.exp64
@@ -341,7 +341,7 @@
<unique>0x........</unique>
<tid>...</tid>
<kind>SyscallParam</kind>
- <what>Syscall param exit_group(status) contains uninitialised byte(s)</what>
+ <what>Syscall param exit(status) contains uninitialised byte(s)</what>
</error>
<errorcounts>