[PATCH] Fix the waitid sanitizer interceptor to work on FreeBSD in 32-bit mode
Viktor Kutuzov
vkutuzov at accesssoftek.com
Fri Aug 1 12:42:23 PDT 2014
Closed by commit rL214543 (authored by vkutuzov).
REPOSITORY
rL LLVM
http://reviews.llvm.org/D4670
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -1542,8 +1542,14 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4670.12117.patch
Type: text/x-patch
Size: 910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140801/0c31fcef/attachment.bin>
More information about the llvm-commits
mailing list