diff options
Diffstat (limited to 'compiler-rt/test/msan/Linux/syscalls.cc')
-rw-r--r-- | compiler-rt/test/msan/Linux/syscalls.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler-rt/test/msan/Linux/syscalls.cc b/compiler-rt/test/msan/Linux/syscalls.cc index 78dba36638a..c5ac3e27fa1 100644 --- a/compiler-rt/test/msan/Linux/syscalls.cc +++ b/compiler-rt/test/msan/Linux/syscalls.cc @@ -19,7 +19,7 @@ sanity of their behaviour. */ int main(int argc, char *argv[]) { - char buf[1000]; + char buf[1000] __attribute__((aligned(8))); const int kTen = 10; const int kFortyTwo = 42; memset(buf, 0, sizeof(buf)); @@ -111,5 +111,17 @@ int main(int argc, char *argv[]) { assert(__msan_test_shadow(&p, sizeof(p)) == -1); assert(__msan_test_shadow(buf, sizeof(buf)) >= 32); + __msan_poison(buf, sizeof(buf)); + __sanitizer_syscall_post_pipe(0, (int *)buf); + assert(__msan_test_shadow(buf, sizeof(buf)) == 2 * sizeof(int)); + + __msan_poison(buf, sizeof(buf)); + __sanitizer_syscall_post_pipe2(0, (int *)buf, 0); + assert(__msan_test_shadow(buf, sizeof(buf)) == 2 * sizeof(int)); + + __msan_poison(buf, sizeof(buf)); + __sanitizer_syscall_post_socketpair(0, 0, 0, 0, (int *)buf); + assert(__msan_test_shadow(buf, sizeof(buf)) == 2 * sizeof(int)); + return 0; } |