mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-09 13:18:15 +00:00
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
19 lines
313 B
C
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);
|
|
}
|
|
|