summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2015-05-11 14:46:16 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2015-05-11 14:46:16 +0000
commit104a383e120657d7a384a301ddda9067a8afbf0e (patch)
tree68fabe17d173df07bcabb20acd62bfcc9cf903a6
parent71b91c2dbaea500cf86ef652f0e8e66e22289900 (diff)
downloadbcm5719-llvm-104a383e120657d7a384a301ddda9067a8afbf0e.tar.gz
bcm5719-llvm-104a383e120657d7a384a301ddda9067a8afbf0e.zip
[Msan] Fix the if_indextoname.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9456 llvm-svn: 236999
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h3
-rw-r--r--compiler-rt/test/msan/if_indextoname.cc2
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 16312a3193f..9b3e99b7bc8 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -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
diff --git a/compiler-rt/test/msan/if_indextoname.cc b/compiler-rt/test/msan/if_indextoname.cc
index 7f7dea7d51f..7b1b989e57d 100644
--- a/compiler-rt/test/msan/if_indextoname.cc
+++ b/compiler-rt/test/msan/if_indextoname.cc
@@ -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;
}
OpenPOWER on IntegriCloud