// PRE_MEM_READ/PRE_MEM_WRITE calls. (Note that Memcheck and Addrcheck 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
// XXX: This is simplistic -- need to do all the sub-cases properly.
// XXX: Also, should be 6 scalar errors, except glibc's syscall() doesn't
// use the 6th one!
- #include <asm/ipc.h>
GO(__NR_ipc, "5s 0m");
SY(__NR_ipc, x0+4, x0, x0, x0, x0, x0); FAIL;
//SY(__NR_sigreturn); // (Not yet handled by Valgrind) FAIL;
// __NR_clone 120
- #include <sched.h>
- #include <signal.h>
#ifndef CLONE_PARENT_SETTID
#define CLONE_PARENT_SETTID 0x00100000
#endif
SIMPLE_COPY(strcpy, 16, "6666666666666666", 57);
/* Simple test using implicitly coerced `void *' arguments. */
- const void *src = "frobozz";
- void *dst = one;
- check (strcpy (dst, src) == dst, 1);
- equal (dst, "frobozz", 2);
+ { const void *src = "frobozz";
+ void *dst = one;
+ check (strcpy (dst, src) == dst, 1);
+ equal (dst, "frobozz", 2);
+ }
}
static void
pthread_t pth;
sigset_t mask;
int status;
+ struct sigaction sa;
sigemptyset(&mask);
sigaddset(&mask, SIGCHLD);
sigprocmask(SIG_BLOCK, &mask, NULL);
- struct sigaction sa;
sa.sa_handler = handler;
sa.sa_flags = 0;
sigfillset(&sa.sa_mask);