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

Sagar Thakur via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 6 22:39:40 PST 2016


slthakur removed rL LLVM as the repository for this revision.
slthakur updated this revision to Diff 77012.
slthakur added a comment.

Removed the restorer field from the kernel sigaction structure for MIPS.


https://reviews.llvm.org/D25814

Files:
  test/msan/Linux/syscalls_sigaction.cc


Index: test/msan/Linux/syscalls_sigaction.cc
===================================================================
--- test/msan/Linux/syscalls_sigaction.cc
+++ test/msan/Linux/syscalls_sigaction.cc
@@ -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 @@
   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
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25814.77012.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161107/4eed4002/attachment.bin>


More information about the llvm-commits mailing list