mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-12 06:11:37 +00:00
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
This commit is contained in:
31
memcheck/tests/clientstackperm.c
Normal file
31
memcheck/tests/clientstackperm.c
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user