1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O3 %s -o %t
8 #include <sanitizer/msan_interface.h>
10 int main(int argc
, char **argv
) {
11 char s
[20] = "string";
12 __msan_poison(s
, sizeof(s
));
13 __msan_unpoison_string(s
);
14 assert(__msan_test_shadow(s
, sizeof(s
)) == strlen("string") + 1);