| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/include/portability.h" | 7 #include "native_client/src/include/portability.h" |
| 8 | 8 |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| 11 #if NACL_LINUX | 11 #if NACL_LINUX |
| 12 # include <sys/mman.h> | 12 # include <sys/mman.h> |
| 13 #elif NACL_OSX | 13 #elif NACL_OSX |
| 14 # include <mach/mach.h> | 14 # include <mach/mach.h> |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 #include "native_client/src/trusted/service_runtime/include/bits/mman.h" |
| 17 #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h" | 18 #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h" |
| 18 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" | 19 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" |
| 19 #include "native_client/src/trusted/service_runtime/include/sys/mman.h" | |
| 20 | 20 |
| 21 #include "native_client/src/include/nacl_assert.h" | 21 #include "native_client/src/include/nacl_assert.h" |
| 22 #include "native_client/src/shared/gio/gio.h" | 22 #include "native_client/src/shared/gio/gio.h" |
| 23 #include "native_client/src/trusted/service_runtime/mmap_test_check.h" | 23 #include "native_client/src/trusted/service_runtime/mmap_test_check.h" |
| 24 #include "native_client/src/trusted/service_runtime/nacl_all_modules.h" | 24 #include "native_client/src/trusted/service_runtime/nacl_all_modules.h" |
| 25 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" | 25 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" |
| 26 #include "native_client/src/trusted/service_runtime/nacl_syscall_common.h" | 26 #include "native_client/src/trusted/service_runtime/nacl_syscall_common.h" |
| 27 #include "native_client/src/trusted/service_runtime/nacl_valgrind_hooks.h" | 27 #include "native_client/src/trusted/service_runtime/nacl_valgrind_hooks.h" |
| 28 #include "native_client/src/trusted/service_runtime/sel_addrspace.h" | 28 #include "native_client/src/trusted/service_runtime/sel_addrspace.h" |
| 29 #include "native_client/src/trusted/service_runtime/sel_ldr.h" | 29 #include "native_client/src/trusted/service_runtime/sel_ldr.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 && NACL_BUILD_SUBARCH == 64 | 460 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 && NACL_BUILD_SUBARCH == 64 |
| 461 CheckForGuardRegion(nap->mem_start - ((size_t) 40 << 30), (size_t) 40 << 30); | 461 CheckForGuardRegion(nap->mem_start - ((size_t) 40 << 30), (size_t) 40 << 30); |
| 462 CheckForGuardRegion(nap->mem_start + ((size_t) 4 << 30), (size_t) 40 << 30); | 462 CheckForGuardRegion(nap->mem_start + ((size_t) 4 << 30), (size_t) 40 << 30); |
| 463 #endif | 463 #endif |
| 464 | 464 |
| 465 NaClAddrSpaceFree(nap); | 465 NaClAddrSpaceFree(nap); |
| 466 | 466 |
| 467 printf("PASS\n"); | 467 printf("PASS\n"); |
| 468 return 0; | 468 return 0; |
| 469 } | 469 } |
| OLD | NEW |