[PATCH] [Msan] Fix the if_indextoname.cc test to pass on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Fri May 8 05:09:04 PDT 2015


Updated.


http://reviews.llvm.org/D9456

Files:
  lib/sanitizer_common/sanitizer_platform_interceptors.h
  test/msan/if_indextoname.cc

Index: lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ 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
Index: test/msan/if_indextoname.cc
===================================================================
--- test/msan/if_indextoname.cc
+++ test/msan/if_indextoname.cc
@@ -18,6 +18,6 @@
     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;
 }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9456.25308.patch
Type: text/x-patch
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150508/80ddcd2c/attachment.bin>


More information about the llvm-commits mailing list