[compiler-rt] r236999 - [Msan] Fix the if_indextoname.cc test to pass on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon May 11 07:46:17 PDT 2015
Author: vkutuzov
Date: Mon May 11 09:46:16 2015
New Revision: 236999
URL: http://llvm.org/viewvc/llvm-project?rev=236999&view=rev
Log:
[Msan] Fix the if_indextoname.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9456
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
compiler-rt/trunk/test/msan/if_indextoname.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h?rev=236999&r1=236998&r2=236999&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Mon May 11 09:46:16 2015
@@ -226,7 +226,8 @@
#define SANITIZER_INTERCEPT_GETRESID SI_LINUX
#define SANITIZER_INTERCEPT_GETIFADDRS \
SI_FREEBSD || SI_LINUX_NOT_ANDROID || SI_MAC
-#define SANITIZER_INTERCEPT_IF_INDEXTONAME SI_LINUX_NOT_ANDROID || SI_MAC
+#define SANITIZER_INTERCEPT_IF_INDEXTONAME \
+ SI_FREEBSD || SI_LINUX_NOT_ANDROID || SI_MAC
#define SANITIZER_INTERCEPT_CAPGET SI_LINUX_NOT_ANDROID
#define SANITIZER_INTERCEPT_AEABI_MEM SI_LINUX && defined(__arm__)
#define SANITIZER_INTERCEPT___BZERO SI_MAC
Modified: compiler-rt/trunk/test/msan/if_indextoname.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/if_indextoname.cc?rev=236999&r1=236998&r2=236999&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/if_indextoname.cc (original)
+++ compiler-rt/trunk/test/msan/if_indextoname.cc Mon May 11 09:46:16 2015
@@ -18,6 +18,6 @@ int main(int argc, char *argv[]) {
printf("No network interfaces found.\n");
return 0;
}
- assert(strlen(ifname) + 1 == __msan_test_shadow(ifname, sizeof(ifname)));
+ assert(strlen(ifname) + 1 <= __msan_test_shadow(ifname, sizeof(ifname)));
return 0;
}
More information about the llvm-commits
mailing list