forked from OSchip/llvm-project
[sanitizer] Add missing declarations for sigaltstack syscall wrappers.
Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D73987
This commit is contained in:
parent
9b0ce8edfa
commit
dd921cb89b
|
@ -3077,6 +3077,8 @@ void __sanitizer_syscall_pre_impl_rt_sigaction(long signum, long act,
|
|||
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
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <linux/aio_abi.h>
|
||||
#include <signal.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/uio.h>
|
||||
|
@ -123,5 +124,9 @@ int main(int argc, char *argv[]) {
|
|||
__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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue