[compiler-rt] r254292 - [asan] Old Linux kernels (< 3.0) don't define ARM_VFPREGS_SIZE that leads to
Yury Gribov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 01:19:22 PST 2015
Author: ygribov
Date: Mon Nov 30 03:19:22 2015
New Revision: 254292
URL: http://llvm.org/viewvc/llvm-project?rev=254292&view=rev
Log:
[asan] Old Linux kernels (< 3.0) don't define ARM_VFPREGS_SIZE that leads to
build errors on ARM. Define it internally to avoid such errors.
Patch by Max Ostapenko.
Differential Revision: http://reviews.llvm.org/D14921
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=254292&r1=254291&r2=254292&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Mon Nov 30 03:19:22 2015
@@ -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_SIZE_AND_OFFSET(cookie_io_function
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
More information about the llvm-commits
mailing list