tests/vg_regtest: Always evaluate prerequisite expressions with sh
[valgrind.git] / memcheck / tests / x86-linux / bug133694.c
bloba12813bddfce0a0cc0ce8111a836bf7dfa92b826
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "tests/sys_mman.h"
5 int main(int argc, char **argv)
7 void *a1;
9 if ((a1 = mmap((void *)0x200000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)) == MAP_FAILED)
11 perror("mmap1");
12 exit(1);
15 if (munmap(a1, 4096) < 0)
17 perror("munmap1");
18 exit(1);
21 if (mmap((void *)0x100000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) == MAP_FAILED)
23 perror("mmap2");
24 exit(1);
27 if (mmap((void *)0x100000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) == MAP_FAILED)
29 perror("mmap2");
30 exit(1);
33 printf("success\n");
34 exit(0);