[PATCH] [Msan] Make unit tests that use mempcpy() passing on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu Feb 12 06:00:50 PST 2015


Hi kcc, samsonov, eugenis, emaste,

http://reviews.llvm.org/D7588

Files:
  lib/msan/tests/msan_test.cc

Index: lib/msan/tests/msan_test.cc
===================================================================
--- lib/msan/tests/msan_test.cc
+++ lib/msan/tests/msan_test.cc
@@ -78,6 +78,12 @@
 # include <sys/mount.h>
 # define f_namelen f_namemax  // FreeBSD names this statfs field so.
 # define cpu_set_t cpuset_t
+extern "C" {
+// FreeBSD's <ssp/string.h> defines mempcpy() to be a macro expanding into
+// a __builtin___mempcpy_chk() call, but since Msan RTL defines it as an
+// ordinary function, we can declare it here to complete the tests.
+void *mempcpy(void *dest, const void *src, size_t n);
+}
 #endif
 
 #if defined(__i386__) || defined(__x86_64__)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7588.19823.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150212/e0fb331e/attachment.bin>


More information about the llvm-commits mailing list