[compiler-rt] r234748 - Cast an argument to mprotect syscall to uptr to fix X32

Timur Iskhodzhanov timurrrr at google.com
Mon Apr 13 05:13:03 PDT 2015


Author: timurrrr
Date: Mon Apr 13 07:13:03 2015
New Revision: 234748

URL: http://llvm.org/viewvc/llvm-project?rev=234748&view=rev
Log:
Cast an argument to mprotect syscall to uptr to fix X32

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=234748&r1=234747&r2=234748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Mon Apr 13 07:13:03 2015
@@ -128,7 +128,7 @@ uptr internal_munmap(void *addr, uptr le
 }
 
 int internal_mprotect(void *addr, uptr length, int prot) {
-  return internal_syscall(SYSCALL(mprotect), addr, length, prot);
+  return internal_syscall(SYSCALL(mprotect), (uptr)addr, length, prot);
 }
 
 uptr internal_close(fd_t fd) {





More information about the llvm-commits mailing list