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
#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;