Revert "[sanitizers] read/write page fault detection on mac."
authorMehdi Amini <mehdi.amini@apple.com>
Tue, 26 Apr 2016 07:03:11 +0000 (07:03 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Tue, 26 Apr 2016 07:03:11 +0000 (07:03 +0000)
This reverts commit r267477.
It broke our bots that enables the AArch64 backends, it seems that
this code is using a Darwin *X86 specific* field.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 267526

compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
compiler-rt/test/asan/TestCases/Linux/segv_read_write.c [moved from compiler-rt/test/asan/TestCases/Posix/segv_read_write.c with 100% similarity]

index c2e3d7f..5fbb147 100644 (file)
@@ -500,8 +500,7 @@ void LogFullErrorReport(const char *buffer) {
 }
 
 SignalContext::WriteFlag SignalContext::GetWriteFlag(void *context) {
-  ucontext_t *ucontext = static_cast<ucontext_t*>(context);
-  return ucontext->uc_mcontext->__es.__err & 2 /*T_PF_WRITE*/ ? WRITE : READ;
+  return UNKNOWN;  // FIXME: implement this.
 }
 
 void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {