[PATCH] D24332: [ESan] [MIPS] Fix workingset-signal-posix.cpp on MIPS

Derek Bruening via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 10:10:16 PDT 2016


bruening accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:610
@@ -609,3 +609,3 @@
   struct __sanitizer_kernel_sigset_t {
-    u8 sig[16];
+    uptr sig[2];
   };
----------------
slthakur wrote:
> bruening wrote:
> > Aren't there references in source code files that need to be updated for this change?  At a glance I see things like "(sizeof(k_set->sig[0]) * 8)".
> There the two functions which reference __sanitizer_kernel_sigset_t.sig:
> 
> - internal_sigdelset
> - internal_sigismember
> 
> Both of these functions were producing wrong results on big endian machines because __sanitizer_kernel_sigset_t.sig was declared as a char array. Both these functions return correct result with this change.
OK, you're saying that the *kernel* defines the signal set array as some multi-byte structure (unsigned long) and thus endian-ness comes into play between the sanitizer code and the kernel.


Repository:
  rL LLVM

https://reviews.llvm.org/D24332





More information about the llvm-commits mailing list