[compiler-rt] r276803 - [asan] Remove zero FSR check on ARM.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 14:02:46 PDT 2016
Author: eugenis
Date: Tue Jul 26 16:02:45 2016
New Revision: 276803
URL: http://llvm.org/viewvc/llvm-project?rev=276803&view=rev
Log:
[asan] Remove zero FSR check on ARM.
The kernel on Nexus 5X returns error_code in ucontext which has
correct FSR_WRITE flag, but empty (zero) abort type field. Removing
the checks means that we will report all SEGVs as READ on very old
kernels, but will properly distinguish READ vs WRITE on moderately
old ones.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=276803&r1=276802&r2=276803&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Tue Jul 26 16:02:45 2016
@@ -1292,10 +1292,6 @@ SignalContext::WriteFlag SignalContext::
#elif defined(__arm__)
static const uptr FSR_WRITE = 1U << 11;
uptr fsr = ucontext->uc_mcontext.error_code;
- // FSR bits 5:0 describe the abort type, and are never 0 (or so it seems).
- // Zero FSR indicates an older kernel that does not pass this information to
- // the userspace.
- if (fsr == 0) return UNKNOWN;
return fsr & FSR_WRITE ? WRITE : READ;
#elif defined(__aarch64__)
static const u64 ESR_ELx_WNR = 1U << 6;
More information about the llvm-commits
mailing list