[sanitizers] read/write page fault detection on mac.

Subscribers: kubabrecka

Differential Revision: http://reviews.llvm.org/D19495

llvm-svn: 267477
This commit is contained in:
Mike Aizatsky 2016-04-25 21:44:43 +00:00
parent 1711f2d8bd
commit f2bee298a0
2 changed files with 2 additions and 1 deletions

View File

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