[PATCH] D44777: Mmap interceptor providing mprotect support
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 23 15:28:50 PDT 2018
devnexen added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_malloc_mac.inc:76
INTERCEPTOR(int, mprotect, void *addr, size_t len, int prot) {
+ if (common_flags()->detect_write_exec)
+ ReportMmapWriteExec(prot);
----------------
vitalybuka wrote:
> It does not look right.
> We have now two conditional interceptors.
>
> I think better approach to instert some mmaloc hook into the common interceptor
> and make it empty on all platforms and put "if (addr == malloc_zones && prot == PROT_READ) {" into the mac one.
Sure fair point I tried to avoid too much changes. Will update.
https://reviews.llvm.org/D44777
More information about the llvm-commits
mailing list