1 | // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t >%t.out 2>&1 |
2 | // RUN: FileCheck %s < %t.out |
3 | |
4 | #include <stdint.h> |
5 | #include <sanitizer/msan_interface.h> |
6 | |
7 | int main(void) { |
8 | unsigned long long x = 0; // For 8-byte alignment. |
9 | char x_s[4] = {0x77, 0x65, 0x43, 0x21}; |
10 | __msan_partial_poison(data: &x, shadow: &x_s, size: sizeof(x_s)); |
11 | __msan_print_shadow(x: &x, size: sizeof(x_s)); |
12 | return 0; |
13 | } |
14 | |
15 | // CHECK: Shadow map [0x{{[0-9a-f]+}}, 0x{{[0-9a-f]+}}) of [0x{{[0-9a-f]+}}, 0x{{[0-9a-f]+}}), 4 bytes: |
16 | // CHECK: 0x{{.*}}: 77654321 ........ ........ ........ |
17 | |