From: Evgeniy Stepanov Date: Tue, 26 Jul 2016 21:02:45 +0000 (+0000) Subject: [asan] Remove zero FSR check on ARM. X-Git-Tag: llvmorg-4.0.0-rc1~14137 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d140aec490dcbcb5e1835ea55080ec4f9007785a;p=platform%2Fupstream%2Fllvm.git [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. llvm-svn: 276803 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index b8890ea..c2fa4c0 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -1292,10 +1292,6 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag(void *context) { #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;