2015-03-03 03:34:27 +08:00
|
|
|
// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t >%t.out 2>&1
|
2014-06-06 22:06:14 +08:00
|
|
|
// RUN: FileCheck %s < %t.out
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <sanitizer/msan_interface.h>
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
unsigned long long x = 0; // For 8-byte alignment.
|
2016-02-26 14:44:10 +08:00
|
|
|
char x_s[4] = {0x87, 0x65, 0x43, 0x21};
|
2014-06-06 22:06:14 +08:00
|
|
|
__msan_partial_poison(&x, &x_s, sizeof(x_s));
|
|
|
|
__msan_print_shadow(&x, sizeof(x_s));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: Shadow map of [{{.*}}), 4 bytes:
|
|
|
|
// CHECK: 0x{{.*}}: 87654321 ........ ........ ........
|