Stack traces for Memcheck's syscall param errors are terribly unreliable, so

I changed it to just filter the entire stack trace out for these errors (both
normal and XML cases).  The syscall name is still present in the error
string.  This allows a one or more alternative expected output files to be
removed for several tests, which is A Very Good Thing.

Also, I killed filter_test_paths because it was weird and clumsy and the
above change obviated most of its use and the remaining effects could be
achieved in other ways.

Also, I fixed up the scalar* tests a little and they now pass on my machine,
(and hopefully at least some other machines) for the first time ever!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9178
This commit is contained in:
Nicholas Nethercote 2009-02-16 05:11:49 +00:00
parent 108768ee98
commit cf6cd2bb31
42 changed files with 851 additions and 6677 deletions

View File

@ -4,8 +4,6 @@ dir=`dirname $0`
./filter_stderr |
$dir/../../tests/filter_test_paths |
sed s/"^Open AF_UNIX socket [0-9]*: <unknown>/Open AF_UNIX socket .: <unknown>/" |
sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/dev\/null/Open \\1 .: \/dev\/null/" |
sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/tmp\/\(sock\|data1\|data2\|file\)\.[0-9]*/Open \\1 .: \/tmp\/\\2/" |

View File

@ -7,8 +7,6 @@ $dir/../../tests/filter_stderr_basic |
# Anonymise addresses
$dir/../../tests/filter_addresses |
$dir/../../tests/filter_test_paths |
# Anonymise paths like "(in /foo/bar/libc-baz.so)"
sed "s/(in \/.*libc.*)$/(in \/...libc...)/" |
sed "s/(in \/.*libpthread.*)$/(in \/...libpthread...)/" |
@ -25,13 +23,13 @@ sed \
# Tidy up in cases where glibc (+ libdl + libpthread + ld) have
# been built with debugging information, hence source locs are present
sed \
-e "s/vfprintf ([a-z]*printf.c:[0-9]*)/.../" \
-e "s/vsprintf ([a-z]*printf.c:[0-9]*)/.../" \
-e "s/sprintf (sprintf.c:[0-9]*)/.../" \
-e "s/printf (printf.c:[0-9]*)/.../" \
-e "s/strdup (strdup.c:[0-9]*)/.../" \
-e "s/pthread_key_create.c:[0-9]*/in \/...libpthread.../" \
-e "s/genops.c:[0-9]*/in \/...libc.../" |
-e "s/ vfprintf (.*)/ .../" \
-e "s/ vsprintf (.*)/ .../" \
-e "s/ sprintf (.*)/ .../" \
-e "s/ printf (.*)/ .../" \
-e "s/ strdup (.*)/ .../" \
-e "s/ pthread_key_create.c:[0-9]*/ in \/...libpthread.../" \
-e "s/ genops.c:[0-9]*/ in \/...libc.../" |
# Anonymise line numbers in h_intercepts.c.
sed "s/h_intercepts.c:[0-9]*/h_intercepts.c:.../"

View File

@ -36,5 +36,3 @@ sed \
sed \
-e "s/hread #[0-9][0-9]*/hread #x/g" \
-e "s/hread [0-9][0-9]*/hread x/g"
$dir/../../tests/filter_test_paths

View File

@ -40,7 +40,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
badpoll.stderr.exp badpoll.vgtest \
badrw.stderr.exp badrw.vgtest \
brk2.stderr.exp brk2.vgtest \
buflen_check.stderr.exp buflen_check.stderr.exp2 buflen_check.vgtest \
buflen_check.stderr.exp buflen_check.vgtest \
clientperm.stderr.exp \
clientperm.stdout.exp clientperm.vgtest \
custom_alloc.stderr.exp custom_alloc.vgtest \
@ -52,11 +52,11 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
error_counts.stderr.exp error_counts.stdout.exp error_counts.vgtest \
errs1.stderr.exp errs1.vgtest \
exitprog.stderr.exp exitprog.vgtest \
execve.stderr.exp execve.stderr.exp2 execve.vgtest \
execve2.stderr.exp execve2.stderr.exp2 execve2.vgtest \
execve.stderr.exp execve.vgtest \
execve2.stderr.exp execve2.vgtest \
file_locking.stderr.exp file_locking.vgtest \
fprw.stderr.exp fprw.vgtest \
fwrite.stderr.exp fwrite.stderr.exp2 fwrite.vgtest \
fwrite.stderr.exp fwrite.vgtest \
inits.stderr.exp inits.vgtest \
inline.stderr.exp inline.stdout.exp inline.vgtest \
leak-0.vgtest leak-0.stderr.exp \
@ -174,9 +174,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \
wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \
wrap8.stdout.exp2 wrap8.stderr.exp2 \
writev.stderr.exp writev.stderr.exp2 writev.stderr.exp3 writev.vgtest \
xml1.stderr.exp xml1.stderr.exp2 xml1.stderr.exp3 \
xml1.stderr.exp64 xml1.stderr.exp64_2 xml1.stdout.exp \
writev.stderr.exp writev.vgtest \
xml1.stderr.exp xml1.stderr.exp2 \
xml1.stderr.exp64 xml1.stdout.exp \
xml1.vgtest \
zeropage.stderr.exp zeropage.stderr.exp2 zeropage.stdout.exp \
zeropage.vgtest

View File

@ -1,13 +1,11 @@
Syscall param poll(ufds.fd) points to uninitialised byte(s)
at 0x........: poll (in /...libc...)
by 0x........: main (badpoll.c:22)
...
Address 0x........ is 8 bytes inside a block of size 15 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (badpoll.c:12)
Syscall param poll(ufds.reventss) points to unaddressable byte(s)
at 0x........: poll (in /...libc...)
by 0x........: main (badpoll.c:22)
...
Address 0x........ is 0 bytes after a block of size 15 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (badpoll.c:12)

View File

@ -1,11 +1,9 @@
Syscall param socketcall.getsockname(name) points to unaddressable byte(s)
at 0x........: getsockname (in /...libc...)
by 0x........: main (buflen_check.c:18)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param socketcall.getsockname(namelen_in) points to unaddressable byte(s)
at 0x........: getsockname (in /...libc...)
by 0x........: main (buflen_check.c:19)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
getsockname(1) failed
getsockname(2) failed

View File

@ -1,11 +0,0 @@
Syscall param socketcall.getsockname(name) points to unaddressable byte(s)
at 0x........: getsockname (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param socketcall.getsockname(namelen_in) points to unaddressable byte(s)
at 0x........: getsockname (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
getsockname(1) failed
getsockname(2) failed

View File

@ -1,14 +1,11 @@
Syscall param execve(filename) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: main (execve.c:9)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param execve(argv[i]) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: main (execve.c:9)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param execve(envp[i]) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: main (execve.c:9)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -1,14 +0,0 @@
Syscall param execve(filename) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param execve(argv[i]) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param execve(envp[i]) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -1,4 +1,3 @@
Syscall param execve(filename) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: main (execve2.c:8)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -1,4 +0,0 @@
Syscall param execve(filename) points to unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: (below main)
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -16,4 +16,20 @@ 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 .../" |
$dir/../../tests/filter_test_paths
# 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.
# '(below main)', etc.
#
# So we just cut out the entire stack trace. It's coarse but effective, and
# there aren't that many cases like this, and the error line gives the
# syscall name.
#
# The '<' is to avoid matching the XML case; we don't use '>' because that
# appears in some of the syscall parameter names (eg "act->sa_handler").
perl -p -0 -e 's/(Syscall param[^\n<]*)\n( (at|by)[^\n]*\n)*/$1\n ...\n/gs' |
# Something similar for XML output. Chops everything within
# <stack>...</stack>.
perl -p -0 -e 's/(<what>Syscall param[^\n]*)\n([^\n]*(stack|frame|ip|obj|fn)[^\n]*\n)*/$1\n/gs'

View File

@ -1,6 +1,5 @@
Syscall param write(buf) points to uninitialised byte(s)
at 0x........: write (in /...libc...)
by 0x........: (below main)
...
Address 0x........ is 0 bytes inside a block of size 10 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (fwrite.c:7)

View File

@ -1,6 +0,0 @@
Syscall param write(buf) points to uninitialised byte(s)
at 0x........: write (in /...libc...)
by 0x........: main (fwrite.c:12)
Address 0x........ is 0 bytes inside a block of size 10 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (fwrite.c:7)

View File

@ -5,60 +5,65 @@
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include "../memcheck.h"
int main ( void )
{
int *r, *oldr, *a;
#define TEST(x, exp_x, desc) \
VALGRIND_MAKE_MEM_DEFINED(&x, sizeof(int)); \
if (x == exp_x) { \
fprintf(stderr, "PASSED: " desc "\n"); \
} else { \
fprintf(stderr, "FAILED: " desc "\n"); \
}
//-------------------------------------------------------------
fprintf(stderr, "test simple malloc/free:\n");
a = malloc(10 * sizeof(int)); assert(a);
fprintf(stderr, "(should be malloc-filled) a[4] = %x\n", a[4]);
TEST(a[4], 0x55555555, "malloc-filled");
free(a);
fprintf(stderr, "(should be free-filled) a[5] = %x\n", a[5]);
TEST(a[5], 0x77777777, " free-filled");
fprintf(stderr, "test realloc-larger:\n");
//-------------------------------------------------------------
fprintf(stderr, "\ntest realloc-larger:\n");
r = malloc(30 * sizeof(int)); assert(r);
fprintf(stderr, "(should be malloc-filled) r[25] = %x\n", r[25]);
TEST(r[25], 0x55555555, "malloc-filled");
/* Make larger */
oldr = r;
r = realloc(r, 40 * sizeof(int)); assert(r);
fprintf(stderr, "(should be free-filled) oldr[26] = %x\n", oldr[26]);
fprintf(stderr, "(should be malloc-filled) r[35] = %x\n", r[35]);
TEST(oldr[26], 0x77777777, " free-filled");
TEST( r[35], 0x55555555, "malloc-filled");
free(r);
fprintf(stderr, "test realloc-smaller:\n");
//-------------------------------------------------------------
fprintf(stderr, "\ntest realloc-smaller:\n");
r = malloc(30 * sizeof(int)); assert(r);
fprintf(stderr, "(should be malloc-filled) r[25] = %x\n", r[25]);
TEST(r[25], 0x55555555, "malloc-filled");
/* Make smaller */
oldr = r;
r = realloc(r, 20 * sizeof(int)); assert(r);
fprintf(stderr, "(should be free-filled) oldr[26] = %x\n", oldr[26]);
TEST(oldr[26], 0x77777777, " free-filled");
free(r);
fprintf(stderr, "test calloc:\n");
//-------------------------------------------------------------
fprintf(stderr, "\ntest calloc:\n");
a = calloc(100, sizeof(int)); assert(r);
fprintf(stderr, "(should be zero) a[42] = %x\n", a[42]);
TEST(a[42], 0x00000000, "zero");
free(a);
return 0;
}

View File

@ -1,60 +1,15 @@
test simple malloc/free:
Use of uninitialised value of size .
at 0x........: (within /...libc...)
by 0x........: ...
by 0x........: ...
by 0x........: ...
by 0x........: ...
by 0x........: main (malloc_free_fill.c:17)
PASSED: malloc-filled
PASSED: free-filled
Conditional jump or move depends on uninitialised value(s)
at 0x........: (within /...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
PASSED: malloc-filled
PASSED: free-filled
PASSED: malloc-filled
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
PASSED: malloc-filled
PASSED: free-filled
Invalid read of size 4
at 0x........: main (malloc_free_fill.c:49)
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:47)
(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
PASSED: zero

View File

@ -1,3 +1,3 @@
prog: malloc_free_fill
vgopts: --malloc-fill=0x55 --free-fill=0x77
vgopts: -q --malloc-fill=0x55 --free-fill=0x77
stderr_filter: filter_malloc_free_fill

View File

@ -48,7 +48,7 @@ Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin1-yes.c:93)
Uninitialised value was created
at 0x........: brk (in /...libc...)
by 0x........: ...
by 0x........: sbrk (in /...libc...)
by 0x........: main (origin1-yes.c:90)
Undef 8 of 8 (MAKE_MEM_UNDEFINED)

View File

@ -47,8 +47,7 @@ Conditional jump or move depends on uninitialised value(s)
by 0x........: main (origin4-many.c:39)
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: _Exit (in /...libc...)
by 0x........: (below main)
...
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:39)

View File

@ -1,55 +0,0 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:51)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:32)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:52)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:33)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:53)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:34)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:54)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:35)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:55)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:36)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:56)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:37)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:57)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:38)
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin4-many.c:58)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:39)
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: _Exit (in /...libc...)
by 0x........: ...
by 0x........: (below main)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (origin4-many.c:39)

View File

@ -1,18 +1,15 @@
Test file created.
Syscall param writev(vector[...]) points to unaddressable byte(s)
at 0x........: writev (in /...libc...)
by 0x........: main (writev.c:56)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EFAULT as expected
Syscall param writev(vector) points to unaddressable byte(s)
at 0x........: writev (in /...libc...)
by 0x........: main (writev.c:68)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected
Syscall param readv(vector) points to unaddressable byte(s)
at 0x........: readv (in /...libc...)
by 0x........: main (writev.c:76)
...
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected

View File

@ -1,18 +0,0 @@
Test file created.
Syscall param writev(vector[...]) points to unaddressable byte(s)
at 0x........: (within /...libc...)
by 0x........: main (writev.c:56)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EFAULT as expected
Syscall param writev(vector) points to unaddressable byte(s)
at 0x........: (within /...libc...)
by 0x........: main (writev.c:68)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected
Syscall param readv(vector) points to unaddressable byte(s)
at 0x........: readv (in /...libc...)
by 0x........: main (writev.c:76)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected

View File

@ -1,18 +0,0 @@
Test file created.
Syscall param writev(vector[...]) points to unaddressable byte(s)
at 0x........: do_writev (in /...libc...)
by 0x........: main (writev.c:56)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EFAULT as expected
Syscall param writev(vector) points to unaddressable byte(s)
at 0x........: do_writev (in /...libc...)
by 0x........: main (writev.c:68)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected
Syscall param readv(vector) points to unaddressable byte(s)
at 0x........: do_readv (in /...libc...)
by 0x........: main (writev.c:76)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected

View File

@ -3,11 +3,11 @@ noinst_SCRIPTS = filter_stderr
noinst_HEADERS = scalar.h
EXTRA_DIST = $(noinst_SCRIPTS) \
scalar.stderr.exp scalar.stderr.exp2 scalar.vgtest \
scalar.stderr.exp scalar.vgtest \
scalar_fork.stderr.exp scalar_fork.vgtest \
scalar_exit_group.stderr.exp scalar_exit_group.stderr.exp2 \
scalar_exit_group.stderr.exp \
scalar_exit_group.vgtest \
scalar_supp.stderr.exp scalar_supp.stderr.exp2 \
scalar_supp.stderr.exp \
scalar_supp.vgtest scalar_supp.supp \
scalar_vfork.stderr.exp scalar_vfork.vgtest

View File

@ -1,5 +1,9 @@
#include "../../memcheck.h"
#include "scalar.h"
#include <unistd.h>
#include <sched.h>
#include <signal.h>
// Here we are trying to trigger every syscall error (scalar errors and
// memory errors) for every syscall. We do this by passing a lot of bogus
@ -14,10 +18,6 @@
// PRE_MEM_READ/PRE_MEM_WRITE calls. (Note that Memcheck will
// always issue an error message immediately before these seg faults occur).
//#include <asm/ipc.h>
#include <sched.h>
#include <signal.h>
int main(void)
{
// uninitialised, but we know px[0] is 0x0
@ -52,10 +52,11 @@ int main(void)
GO(__NR_open, "(2-args) 2s 1m");
SY(__NR_open, x0, x0); FAIL;
// Only 1s 0m errors, because 2s 1m are ignored, being dups of the
// earlier 2-arg open call.
// Only 1s 0m errors -- the other 2s 1m have been checked in the previous
// open test, and if we test them they may be commoned up but they also
// may not.
GO(__NR_open, "(3-args) 1s 0m");
SY(__NR_open, x0, x0+O_CREAT, x0); FAIL;
SY(__NR_open, "scalar.c", O_CREAT|O_EXCL, x0); FAIL;
// __NR_close 6
GO(__NR_close, "1s 0m");
@ -263,13 +264,17 @@ int main(void)
GO(__NR_fcntl, "(GETFD) 2s 0m");
SY(__NR_fcntl, x0-1, x0+F_GETFD, x0); FAILx(EBADF);
// For F_DUPFD the 3rd arg is 'arg'
// For F_DUPFD the 3rd arg is 'arg'. We don't check the 1st two args
// because any errors may or may not be commoned up with the ones from
// the previous fcntl call.
GO(__NR_fcntl, "(DUPFD) 1s 0m");
SY(__NR_fcntl, x0-1, x0+F_DUPFD, x0); FAILx(EBADF);
SY(__NR_fcntl, -1, F_DUPFD, x0); FAILx(EBADF);
// For F_GETLK the 3rd arg is 'lock'. On x86, this fails w/EBADF. But on
GO(__NR_fcntl, "(GETLK) 1s 0m"); // amd64 in 32-bit mode it fails w/EFAULT.
SY(__NR_fcntl, x0-1, x0+F_GETLK, x0); FAIL; //FAILx(EBADF);
// For F_GETLK the 3rd arg is 'lock'. On x86, this fails w/EBADF. But
// on amd64 in 32-bit mode it fails w/EFAULT. We don't check the 1st two
// args for the reason given above.
GO(__NR_fcntl, "(GETLK) 1s 0m");
SY(__NR_fcntl, -1, F_GETLK, x0); FAIL; //FAILx(EBADF);
// __NR_mpx 56
GO(__NR_mpx, "ni");
@ -379,7 +384,7 @@ int main(void)
// __NR_select 82
{
long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 };
GO(__NR_select, "1s 4m");
GO(__NR_select, "1s 5m");
SY(__NR_select, args+x0); FAIL;
}
@ -414,7 +419,7 @@ int main(void)
// __NR_mmap 90
{
long args[6] = { x0, x0, x0, x0, x0-1, x0 };
GO(__NR_mmap, "1s 0m");
GO(__NR_mmap, "1s 1m");
SY(__NR_mmap, args+x0); FAIL;
}
@ -719,7 +724,7 @@ int main(void)
// __NR_mremap 163
GO(__NR_mremap, "5s 0m");
SY(__NR_mremap, x0+1, x0, x0, x0, x0); FAILx(EINVAL);
SY(__NR_mremap, x0+1, x0, x0, x0+MREMAP_FIXED, x0); FAILx(EINVAL);
// __NR_setresuid 164
GO(__NR_setresuid, "3s 0m");
@ -849,7 +854,7 @@ int main(void)
SY(__NR_ugetrlimit, x0, x0); FAIL;
// __NR_mmap2 192
GO(__NR_mmap2, "5s 0m");
GO(__NR_mmap2, "6s 0m");
SY(__NR_mmap2, x0, x0, x0, x0, x0-1, x0); FAIL;
// __NR_truncate64 193
@ -965,18 +970,21 @@ int main(void)
SY(__NR_getdents64, x0, x0, x0+1); FAIL;
// __NR_fcntl64 221
// As with sys_open(), the 'fd' error is suppressed for the later ones.
// For F_GETFD the 3rd arg is ignored
// As with sys_open(), we don't trigger errors for the 1st two args for
// the later ones.
// For F_GETFD the 3rd arg is ignored.
GO(__NR_fcntl64, "(GETFD) 2s 0m");
SY(__NR_fcntl64, x0-1, x0+F_GETFD, x0); FAILx(EBADF);
// For F_DUPFD the 3rd arg is 'arg'
GO(__NR_fcntl64, "(DUPFD) 1s 0m");
SY(__NR_fcntl64, x0-1, x0+F_DUPFD, x0); FAILx(EBADF);
SY(__NR_fcntl64, -1, F_DUPFD, x0); FAILx(EBADF);
// For F_GETLK the 3rd arg is 'lock'. // On x86, this fails w/EBADF. But on
GO(__NR_fcntl64, "(GETLK) 1s 0m"); // amd64 in 32-bit mode it fails w/EFAULT.
SY(__NR_fcntl64, x0-1, x0+F_GETLK, x0); FAIL; //FAILx(EBADF);
// For F_GETLK the 3rd arg is 'lock'.
// On x86, this fails w/EBADF. But on amd64 in 32-bit mode it fails
// w/EFAULT.
GO(__NR_fcntl64, "(GETLK) 1s 0m");
SY(__NR_fcntl64, -1, +F_GETLK, x0); FAIL; //FAILx(EBADF);
// 222
GO(222, "ni");

View File

@ -9,6 +9,7 @@
#include <sys/stat.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <linux/mman.h>
// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
// declare this ourselves.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,5 +2,4 @@
252: __NR_exit_group 1s 0m
-----------------------------------------------------
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main)
...

View File

@ -1,6 +0,0 @@
-----------------------------------------------------
252: __NR_exit_group 1s 0m
-----------------------------------------------------
Syscall param exit_group(exit_code) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: main (scalar_exit_group.c:14)

View File

@ -1,11 +1,8 @@
Syscall param (syscallno) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main)
...
Syscall param write(fd) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main)
...
Syscall param write(count) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: (below main)
...

View File

@ -1,20 +0,0 @@
Syscall param (syscallno) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: main (scalar_supp.c:18)
Syscall param write(fd) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: main (scalar_supp.c:18)
Syscall param write(buf) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: main (scalar_supp.c:18)
Syscall param write(count) contains uninitialised byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: main (scalar_supp.c:18)
Syscall param write(buf) points to unaddressable byte(s)
at 0x........: syscall (in /...libc...)
by 0x........: main (scalar_supp.c:18)
Address 0x........ is not stack'd, malloc'd or (recently) free'd

View File

@ -3,7 +3,7 @@
foo2
Memcheck:Param
write(buf)
fun:syscall
fun:__libc_start_main
...
fun:(below main)
}

View File

@ -342,18 +342,6 @@
<tid>...</tid>
<kind>SyscallParam</kind>
<what>Syscall param exit_group(exit_code) contains uninitialised byte(s)</what>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>_Exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>(below main)</fn>
</frame>
</stack>
</error>
<errorcounts>

View File

@ -342,18 +342,6 @@
<tid>...</tid>
<kind>SyscallParam</kind>
<what>Syscall param exit(exitcode) contains uninitialised byte(s)</what>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>_Exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>(below main)</fn>
</frame>
</stack>
</error>
<errorcounts>

View File

@ -1,445 +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(exit_code) contains uninitialised byte(s)</what>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>_Exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>(below main)</fn>
</frame>
</stack>
</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 1 of 1</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>

View File

@ -342,23 +342,6 @@
<tid>...</tid>
<kind>SyscallParam</kind>
<what>Syscall param exit_group(exit_code) contains uninitialised byte(s)</what>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>_Exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>(below main)</fn>
</frame>
</stack>
</error>
<errorcounts>

View File

@ -1,450 +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 8</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(exit_code) contains uninitialised byte(s)</what>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>_Exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>exit</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>(below main)</fn>
</frame>
</stack>
</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 1 of 1</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>

View File

@ -4,8 +4,6 @@ dir=`dirname $0`
./filter_stderr |
$dir/../../tests/filter_test_paths |
sed s/"^Open AF_UNIX socket [0-9]*: <unknown>/Open AF_UNIX socket .: <unknown>/" |
sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/dev\/null/Open \\1 .: \/dev\/null/" |
sed s/"^Open \(AF_UNIX socket\|file descriptor\) [0-9]*: \/tmp\/\(sock\|data1\|data2\|file\)\.[0-9]*/Open \\1 .: \/tmp\/\\2/" |

View File

@ -9,7 +9,6 @@ noinst_SCRIPTS = \
filter_numbers \
filter_stderr_basic \
filter_sink \
filter_test_paths \
os_test \
platform_test \
vg_regtest

View File

@ -5,5 +5,4 @@ dir=`dirname $0`
# Remove number and position of discards
sed "s/discard [0-9]\+ ([0-9]\+ -> [0-9]\+) translations in range/discard ... (... -> ...) translations in range/" |
$dir/filter_addresses |
$dir/filter_test_paths
$dir/filter_addresses

View File

@ -1,13 +0,0 @@
#! /bin/sh
# Anonymise paths like "/local/foo/bar/tests/baz/quux" (note "tests" is there)
#sed "s/\/.*\/tests\//\/...\/tests\//"
# Remove these three kinds of lines, which tend to appear beneath
# the stack frame of __libc_start_main
# by 0x........: (within /.../tests/malloc2)
# by 0x........: ??? (start.S:81)
# by 0x........: function_name (in object_name)
sed "s/by 0x........: (within [^)]*)/by 0x........: .../" | \
sed "s/by 0x........: ??? ([^)]*)/by 0x........: .../" | \
sed "s/by 0x........: [a-zA-Z0-9_]* (in [^)]*)/by 0x........: .../"