[compiler-rt] r209278 - Cast pointers to uptr when calling internal_syscall
Kostya Serebryany
kcc at google.com
Wed May 21 00:49:04 PDT 2014
Author: kcc
Date: Wed May 21 02:49:03 2014
New Revision: 209278
URL: http://llvm.org/viewvc/llvm-project?rev=209278&view=rev
Log:
Cast pointers to uptr when calling internal_syscall
For Linux/x86-64, pointers passed to internal_syscall should be casted
to uptr first. Otherwise, they won't be properly extended to 64-bit for
x32.
Patch by H.J. Lu
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=209278&r1=209277&r2=209278&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Wed May 21 02:49:03 2014
@@ -555,8 +555,9 @@ uptr internal_sigprocmask(int how, __san
#else
__sanitizer_kernel_sigset_t *k_set = (__sanitizer_kernel_sigset_t *)set;
__sanitizer_kernel_sigset_t *k_oldset = (__sanitizer_kernel_sigset_t *)oldset;
- return internal_syscall(SYSCALL(rt_sigprocmask), (uptr)how, &k_set->sig[0],
- &k_oldset->sig[0], sizeof(__sanitizer_kernel_sigset_t));
+ return internal_syscall(SYSCALL(rt_sigprocmask), (uptr)how,
+ (uptr)&k_set->sig[0], (uptr)&k_oldset->sig[0],
+ sizeof(__sanitizer_kernel_sigset_t));
#endif
}
More information about the llvm-commits
mailing list