1 // REQUIRES: x86_64-target-arch
2 // RUN: %clangxx_asan %s -o %t
3 // RUN: not %run %t 2>&1 | FileCheck %s
4 #include <sanitizer/common_interface_defs.h>
11 __sanitizer_sandbox_arguments args
= {0};
12 // should cache /proc/self/maps
13 __sanitizer_sandbox_on_notify(&args
);
15 if (unshare(CLONE_NEWUSER
)) {
16 printf("unshare failed\n");
20 // remove access to /proc/self/maps
22 printf("chroot failed\n");
26 *(volatile int*)0x42 = 0;
27 // CHECK-NOT: CHECK failed