[PATCH] D25814: [MSAN][MIPS] Fix test Linux/syscalls_sigaction.cc on mips64

Sagar Thakur via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 22:48:56 PDT 2016

slthakur created this revision.
slthakur added a reviewer: eugenis.
slthakur added subscribers: jaydeep, llvm-commits.
slthakur set the repository for this revision to rL LLVM.

Changed the kernel sigaction structure in test syscalls_sigaction.cc for MIPS according to the structure defined in kernel.




Index: test/msan/Linux/syscalls_sigaction.cc
--- test/msan/Linux/syscalls_sigaction.cc
+++ test/msan/Linux/syscalls_sigaction.cc
@@ -11,8 +11,15 @@
 #include <sanitizer/msan_interface.h>
 struct my_kernel_sigaction {
+#if defined(__mips__)
+  long flags, handler;
   long handler, flags, restorer;
   uint64_t mask[20]; // larger than any known platform
+#if defined(__mips__)
+  long restorer;
 int main() {
@@ -35,6 +42,10 @@
   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);
   assert(__msan_test_shadow(&oldact, sizeof(oldact)) == sizeof(long)*3 + 5);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25814.75267.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/9082e1a4/attachment.bin>

More information about the llvm-commits mailing list