[PATCH] D73987: [sanitizer] Add missing declarations for sigaltstack syscall wrappers.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 13:10:01 PST 2020
eugenis updated this revision to Diff 242412.
eugenis added a comment.
fix argument types + add a test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73987/new/
https://reviews.llvm.org/D73987
Files:
compiler-rt/include/sanitizer/linux_syscall_hooks.h
compiler-rt/test/msan/Linux/syscalls.cpp
Index: compiler-rt/test/msan/Linux/syscalls.cpp
===================================================================
--- compiler-rt/test/msan/Linux/syscalls.cpp
+++ compiler-rt/test/msan/Linux/syscalls.cpp
@@ -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 @@
__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;
}
Index: compiler-rt/include/sanitizer/linux_syscall_hooks.h
===================================================================
--- compiler-rt/include/sanitizer/linux_syscall_hooks.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73987.242412.patch
Type: text/x-patch
Size: 1386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200204/f1f4d056/attachment.bin>
More information about the llvm-commits
mailing list