[PATCH] D14921: [sanitizer] Don't use ARM_VFPREGS_SIZE for old kernels.

Yury Gribov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 01:22:22 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL254292: [asan] Old Linux kernels (< 3.0) don't define ARM_VFPREGS_SIZE that leads to (authored by ygribov).

Changed prior to commit:
  http://reviews.llvm.org/D14921?vs=40950&id=41372#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14921

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc

Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -123,6 +123,10 @@
 #  include <asm/ptrace.h>
 #  ifdef __arm__
 typedef struct user_fpregs elf_fpregset_t;
+#   define ARM_VFPREGS_SIZE_ASAN (32 * 8 /*fpregs*/ + 4 /*fpscr*/)
+#   if !defined(ARM_VFPREGS_SIZE)
+#     define ARM_VFPREGS_SIZE ARM_VFPREGS_SIZE_ASAN
+#   endif
 #  endif
 # endif
 # include <semaphore.h>
@@ -1264,4 +1268,8 @@
 CHECK_TYPE_SIZE(sem_t);
 #endif
 
+#if SANITIZER_LINUX && defined(__arm__)
+COMPILER_CHECK(ARM_VFPREGS_SIZE == ARM_VFPREGS_SIZE_ASAN);
+#endif
+
 #endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14921.41372.patch
Type: text/x-patch
Size: 859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151130/1a309033/attachment.bin>


More information about the llvm-commits mailing list