[compiler-rt] r298684 - Fix a warning when running the GotsanRuntimeCheck test on Darwin.
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 20:57:27 PDT 2017
Author: kuba.brecka
Date: Thu Mar 23 22:57:27 2017
New Revision: 298684
URL: http://llvm.org/viewvc/llvm-project?rev=298684&view=rev
Log:
Fix a warning when running the GotsanRuntimeCheck test on Darwin.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=298684&r1=298683&r2=298684&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Thu Mar 23 22:57:27 2017
@@ -102,12 +102,12 @@ extern "C" int __munmap(void *, size_t)
uptr internal_mmap(void *addr, size_t length, int prot, int flags,
int fd, u64 offset) {
if (fd == -1) fd = VM_MAKE_TAG(VM_MEMORY_ANALYSIS_TOOL);
- if (__mmap) return (uptr)__mmap(addr, length, prot, flags, fd, offset);
+ if (&__mmap) return (uptr)__mmap(addr, length, prot, flags, fd, offset);
return (uptr)mmap(addr, length, prot, flags, fd, offset);
}
uptr internal_munmap(void *addr, uptr length) {
- if (__munmap) return __munmap(addr, length);
+ if (&__munmap) return __munmap(addr, length);
return munmap(addr, length);
}
@@ -198,7 +198,7 @@ uptr internal_sigprocmask(int how, __san
extern "C" pid_t __fork(void) SANITIZER_WEAK_ATTRIBUTE;
int internal_fork() {
- if (__fork)
+ if (&__fork)
return __fork();
return fork();
}
More information about the llvm-commits
mailing list