1 | // RUN: %clangxx_msan -O0 %s -o %t && %run %t |
---|---|
2 | |
3 | #include <assert.h> |
4 | #include <pthread.h> |
5 | |
6 | #include <sanitizer/msan_interface.h> |
7 | |
8 | int main() { |
9 | cpu_set_t set_x[4]; |
10 | int res = pthread_getaffinity_np(th: pthread_self(), cpusetsize: sizeof(set_x), cpuset: set_x); |
11 | assert(res == 0); |
12 | __msan_check_mem_is_initialized(x: set_x, size: sizeof(set_x)); |
13 | |
14 | return 0; |
15 | } |
16 |