[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / compiler-rt / test / msan / msan_dump_shadow.cpp
blob48b84ef50f723f7ed4b85c5794e23dcea7bf1a19
1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t >%t.out 2>&1
2 // RUN: FileCheck %s < %t.out
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 -g %s -o %t && %run %t >%t.out 2>&1
5 // RUN: FileCheck %s < %t.out
7 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O0 -g %s -o %t && %run %t >%t.out 2>&1
8 // RUN: FileCheck %s < %t.out
10 #include <sanitizer/msan_interface.h>
12 int main(void) {
13 char *p = new char[16];
14 __msan_dump_shadow(p, 5);
15 delete[] p;
16 const char *q = "abc";
17 __msan_dump_shadow(q, 3);
18 return 0;
21 // CHECK: 0x{{[0-9a-f]+}}[0x{{[0-9a-f]+}}] ff ff ff ff ff
22 // CHECK: 0x{{[0-9a-f]+}}[0x{{[0-9a-f]+}}] 00 00 00