diff --git a/compiler-rt/include/sanitizer/linux_syscall_hooks.h b/compiler-rt/include/sanitizer/linux_syscall_hooks.h --- a/compiler-rt/include/sanitizer/linux_syscall_hooks.h +++ b/compiler-rt/include/sanitizer/linux_syscall_hooks.h @@ -3077,6 +3077,8 @@ long oldact, long sz); void __sanitizer_syscall_post_impl_rt_sigaction(long res, long signum, long act, long oldact, long sz); +void __sanitizer_syscall_pre_impl_sigaltstack(long ss, long oss); +void __sanitizer_syscall_post_impl_sigaltstack(long res, long ss, long oss); #ifdef __cplusplus } // extern "C" #endif diff --git a/compiler-rt/test/msan/Linux/syscalls.cpp b/compiler-rt/test/msan/Linux/syscalls.cpp --- a/compiler-rt/test/msan/Linux/syscalls.cpp +++ b/compiler-rt/test/msan/Linux/syscalls.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -123,5 +124,9 @@ __sanitizer_syscall_post_socketpair(0, 0, 0, 0, (int *)buf); assert(__msan_test_shadow(buf, sizeof(buf)) == 2 * sizeof(int)); + __msan_poison(buf, sizeof(buf)); + __sanitizer_syscall_post_sigaltstack(0, nullptr, (stack_t *)buf); + assert(__msan_test_shadow(buf, sizeof(buf)) == sizeof(stack_t)); + return 0; }