mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-05 19:13:46 +00:00
seem to be simply duplication of the x86 instruction set tests into the addrcheck and helgrind trees. I'm not sure what this duplication achieves. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3264
38 lines
464 B
C
38 lines
464 B
C
#include <signal.h>
|
|
#include <stdio.h>
|
|
|
|
static char *deep;
|
|
|
|
#define SIZE (4*1024*1024)
|
|
|
|
static void handler(int sig)
|
|
{
|
|
char here;
|
|
|
|
if (&here < deep) {
|
|
printf("PASSED\n");
|
|
exit(0);
|
|
}
|
|
|
|
kill(getpid(), SIGUSR1);
|
|
}
|
|
|
|
int main()
|
|
{
|
|
struct sigaction sa;
|
|
|
|
char here;
|
|
deep = &here - SIZE;
|
|
|
|
sa.sa_handler = handler;
|
|
sa.sa_flags = SA_NOMASK;
|
|
sigemptyset(&sa.sa_mask);
|
|
|
|
sigaction(SIGUSR1, &sa, NULL);
|
|
|
|
kill(getpid(), SIGUSR1);
|
|
|
|
printf("FAILED\n");
|
|
exit(1);
|
|
}
|