[compiler-rt] r214543 - Fix the waitid sanitizer interceptor to work on FreeBSD in 32-bit mode
Viktor Kutuzov
vkutuzov at accesssoftek.com
Fri Aug 1 12:33:14 PDT 2014
Author: vkutuzov
Date: Fri Aug 1 14:33:14 2014
New Revision: 214543
URL: http://llvm.org/viewvc/llvm-project?rev=214543&view=rev
Log:
Fix the waitid sanitizer interceptor to work on FreeBSD in 32-bit mode
Differential Revision: http://reviews.llvm.org/D4670
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=214543&r1=214542&r2=214543&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Fri Aug 1 14:33:14 2014
@@ -1542,8 +1542,14 @@ INTERCEPTOR_WITH_SUFFIX(int, wait, int *
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, status, sizeof(*status));
return res;
}
+// On FreeBSD id_t is always 64-bit wide.
+#if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32)
+INTERCEPTOR_WITH_SUFFIX(int, waitid, int idtype, long long id, void *infop,
+ int options) {
+#else
INTERCEPTOR_WITH_SUFFIX(int, waitid, int idtype, int id, void *infop,
int options) {
+#endif
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, waitid, idtype, id, infop, options);
// FIXME: under ASan the call below may write to freed memory and corrupt
More information about the llvm-commits
mailing list