forked from OSchip/llvm-project
[MSAN][MIPS] Fix test Linux/syscalls_sigaction.cc on mips64
Changed the kernel sigaction structure in test syscalls_sigaction.cc for MIPS according to the structure defined in kernel. Reviewed by eugenis. Differential: https://reviews.llvm.org/D25814 llvm-svn: 286583
This commit is contained in:
parent
807f9cf243
commit
cdfdff0b18
|
@ -11,7 +11,11 @@
|
|||
#include <sanitizer/msan_interface.h>
|
||||
|
||||
struct my_kernel_sigaction {
|
||||
#if defined(__mips__)
|
||||
long flags, handler;
|
||||
#else
|
||||
long handler, flags, restorer;
|
||||
#endif
|
||||
uint64_t mask[20]; // larger than any known platform
|
||||
};
|
||||
|
||||
|
@ -35,6 +39,10 @@ int main() {
|
|||
memset(&act, 0, sizeof(act));
|
||||
__msan_poison(&oldact, sizeof(oldact));
|
||||
__sanitizer_syscall_post_rt_sigaction(0, SIGUSR1, &act, &oldact, 5);
|
||||
#if defined(__mips__)
|
||||
assert(__msan_test_shadow(&oldact, sizeof(oldact)) == sizeof(long)*2 + 5);
|
||||
#else
|
||||
assert(__msan_test_shadow(&oldact, sizeof(oldact)) == sizeof(long)*3 + 5);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue