Files
ftmemsim-valgrind/memcheck/tests/clientstackperm.c
Nicholas Nethercote db419f2bdc Moved discard, clientperm and clientstackperm from tests/ into the test
suite-proper, giving them .vgtest files and all that.  They don't make sense
for 1.0.X because the client request constants are different in HEAD, indeed
one of them (clientperm) fails with --stable.

Also moved blocked_syscall.c from tests/ to tests/unused/.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1181
2002-10-04 14:16:38 +00:00

32 lines
715 B
C

#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include "../memcheck.h"
int baaaad ( void )
{
int spacer0[10];
int aaa[10] __attribute__((unused));
int spacer1[10];
int bbb[10] __attribute__((unused));
int spacer2[10];
int ccc[10] __attribute__((unused));
int spacer3[10];
VALGRIND_MAKE_NOACCESS_STACK(spacer0, sizeof spacer0);
VALGRIND_MAKE_NOACCESS_STACK(spacer1, sizeof spacer1);
VALGRIND_MAKE_NOACCESS_STACK(spacer2, sizeof spacer2);
VALGRIND_MAKE_NOACCESS_STACK(spacer3, sizeof spacer3);
printf("reading memory\n");
if ((int*)0xDEADBEEF == &aaa[-3]) { printf("DEAD BEEF!\n"); }
return aaa[-3];
}
int main ( void )
{
int z = baaaad();
return z;
}