Files
ftmemsim-valgrind/memcheck/tests/scalar_exit_group.c
Nicholas Nethercote 126c196c21 Converted the timer_* and clock_* syscalls.
Also now checking the return value of every syscall in scalar, to make sure
that they (mostly) fail as expected.  Because occasionally one would succeed
unexpectedly and unaddressable memory would be marked as addressable, and
things would go haywire.  (The fact that the wrapper sets the memory as
addressable in these cases is a bug with the relevant wrappers;  I'll fix them
later.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3023
2004-11-16 16:15:41 +00:00

19 lines
313 B
C

#include "scalar.h"
int main(void)
{
// uninitialised, but we know px[0] is 0x0
long* px = malloc(sizeof(long));
long x0 = px[0];
int res;
// All __NR_xxx numbers are taken from x86
// __NR_exit_group 252
GO(__NR_exit_group, "1s 0m");
SY(__NR_exit_group, x0);
return(0);
}