[compiler-rt] r328376 - FreeBSD sanitizer common, intercept couple of more functions

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 23 14:45:00 PDT 2018


Author: vitalybuka
Date: Fri Mar 23 14:44:59 2018
New Revision: 328376

URL: http://llvm.org/viewvc/llvm-project?rev=328376&view=rev
Log:
FreeBSD sanitizer common, intercept couple of more functions

Summary:
Intercepts lstat, acct, access, faccessat and strlcpy/strlcat

Patch by David CARLIER

Reviewers: visa, vitalybuka

Subscribers: krytarowski, fedor.sergeev, srhines, kubamracek, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D44432

Added:
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc
      - copied, changed from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc
Removed:
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc
Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
    compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc
    compiler-rt/trunk/test/sanitizer_common/lit.common.cfg

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=328376&r1=328375&r2=328376&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Fri Mar 23 14:44:59 2018
@@ -432,7 +432,7 @@
 
 #define SANITIZER_INTERCEPT_STAT \
   (SI_FREEBSD || SI_MAC || SI_ANDROID || SI_NETBSD || SI_OPENBSD || SI_SOLARIS)
-#define SANITIZER_INTERCEPT_LSTAT SI_NETBSD
+#define SANITIZER_INTERCEPT_LSTAT (SI_NETBSD || SI_FREEBSD)
 #define SANITIZER_INTERCEPT___XSTAT (!SANITIZER_INTERCEPT_STAT && SI_POSIX)
 #define SANITIZER_INTERCEPT___XSTAT64 SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT___LXSTAT SANITIZER_INTERCEPT___XSTAT
@@ -463,16 +463,16 @@
 #define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA)
 #define SANITIZER_INTERCEPT_BSD_SIGNAL SI_ANDROID
 
-#define SANITIZER_INTERCEPT_ACCT (SI_NETBSD || SI_OPENBSD)
+#define SANITIZER_INTERCEPT_ACCT (SI_NETBSD || SI_OPENBSD || SI_FREEBSD)
 #define SANITIZER_INTERCEPT_USER_FROM_UID SI_NETBSD
 #define SANITIZER_INTERCEPT_UID_FROM_USER SI_NETBSD
 #define SANITIZER_INTERCEPT_GROUP_FROM_GID SI_NETBSD
 #define SANITIZER_INTERCEPT_GID_FROM_GROUP SI_NETBSD
-#define SANITIZER_INTERCEPT_ACCESS (SI_NETBSD || SI_OPENBSD)
-#define SANITIZER_INTERCEPT_FACCESSAT (SI_NETBSD || SI_OPENBSD)
+#define SANITIZER_INTERCEPT_ACCESS (SI_NETBSD || SI_OPENBSD || SI_FREEBSD)
+#define SANITIZER_INTERCEPT_FACCESSAT (SI_NETBSD || SI_OPENBSD || SI_FREEBSD)
 #define SANITIZER_INTERCEPT_GETGROUPLIST (SI_NETBSD || SI_OPENBSD)
-#define SANITIZER_INTERCEPT_GETGROUPMEMBERSHIP SI_NETBSD
-#define SANITIZER_INTERCEPT_STRLCPY (SI_NETBSD || SI_OPENBSD)
+#define SANITIZER_INTERCEPT_STRLCPY                                            \
+  (SI_NETBSD || SI_FREEBSD || SI_OPENBSD || SI_MAC || SI_ANDROID)
 
 #define SANITIZER_INTERCEPT_NAME_TO_HANDLE_AT SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_OPEN_BY_HANDLE_AT SI_LINUX_NOT_ANDROID
@@ -487,10 +487,10 @@
 #define SANITIZER_INTERCEPT_READLINKAT \
   (SI_POSIX && !SI_MAC_DEPLOYMENT_BELOW_10_10)
 
-#define SANITIZER_INTERCEPT_DEVNAME (SI_NETBSD || SI_OPENBSD)
-#define SANITIZER_INTERCEPT_DEVNAME_R SI_NETBSD
-#define SANITIZER_INTERCEPT_FGETLN SI_NETBSD
-#define SANITIZER_INTERCEPT_STRMODE SI_NETBSD
+#define SANITIZER_INTERCEPT_DEVNAME (SI_NETBSD || SI_OPENBSD || SI_FREEBSD)
+#define SANITIZER_INTERCEPT_DEVNAME_R (SI_NETBSD || SI_FREEBSD)
+#define SANITIZER_INTERCEPT_FGETLN (SI_NETBSD || SI_FREEBSD)
+#define SANITIZER_INTERCEPT_STRMODE (SI_NETBSD || SI_FREEBSD)
 #define SANITIZER_INTERCEPT_TTYENT SI_NETBSD
 #define SANITIZER_INTERCEPT_PROTOENT SI_NETBSD
 #define SANITIZER_INTERCEPT_NETENT SI_NETBSD

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc (removed)
@@ -1,5 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <unistd.h>
-
-int main(void) { return access("/root", F_OK); }

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-int main(void) {
-  struct stat st;
-  char *name;
-
-  if (stat("/dev/null", &st))
-    exit(1);
-
-  if (!(name = devname(st.st_rdev, S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK)))
-    exit(1);
-
-  printf("%s\n", name);
-
-  // CHECK: null
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sys/cdefs.h>
-#include <sys/stat.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  struct stat st;
-  char name[10];
-  mode_t type;
-
-  if (stat("/dev/null", &st))
-    exit(1);
-
-  type = S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK;
-
-  if (devname_r(st.st_rdev, type, name, __arraycount(name)))
-    exit(1);
-
-  printf("%s\n", name);
-
-  // CHECK: null
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
-  FILE *fp;
-  size_t len;
-  char *s;
-
-  fp = fopen("/etc/hosts", "r");
-  if (!fp)
-    exit(1);
-
-  s = fgetln(fp, &len);
-
-  printf("%.*s\n", (int)len, s);
-
-  if (fclose(fp) == EOF)
-    exit(1);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <stdlib.h>
-#include <sys/stat.h>
-
-int main(void) {
-  struct stat st;
-
-  if (lstat("/dev/null", &st))
-    exit(1);
-
-  if (!S_ISCHR(st.st_mode))
-    exit(1);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc (removed)
@@ -1,52 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  const char src[] = "abc";
-  char dst[7] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test2() {
-  const char src[] = "abc";
-  char dst[7] = {0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test3() {
-  const char src[] = "abc";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test4() {
-  const char src[] = "";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu\n", dst, len);
-}
-
-int main(void) {
-  test1();
-  test2();
-  test3();
-  test4();
-
-  // CHECK: xyzabc 6 abc 3 xyz 3 xyz 3
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc?rev=328375&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc (removed)
@@ -1,52 +0,0 @@
-// RUN: %clangxx -O0 -g %s -o %t && %run %t
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void test1() {
-  const char src[] = "abc";
-  char dst[7] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcpy(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test2() {
-  const char src[] = "abc";
-  char dst[7] = {0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test3() {
-  const char src[] = "abc";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu ", dst, len);
-}
-
-void test4() {
-  const char src[] = "";
-  char dst[4] = {'x', 'y', 'z', 0};
-  size_t len;
-
-  len = strlcat(dst, src, sizeof(dst));
-  printf("%s %zu\n", dst, len);
-}
-
-int main(void) {
-  test1();
-  test2();
-  test3();
-  test4();
-
-  // CHECK: abc 3 abc 3 xyz 3  0
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/access.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/access.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
    (empty)

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname.cc Fri Mar 23 14:44:59 2018
@@ -1,4 +1,5 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: linux, solaris
 
 #include <stdio.h>
 #include <stdlib.h>

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/devname_r.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/devname_r.cc Fri Mar 23 14:44:59 2018
@@ -1,4 +1,5 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: linux, solaris
 
 #include <sys/cdefs.h>
 #include <sys/stat.h>
@@ -16,7 +17,7 @@ int main(void) {
 
   type = S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK;
 
-  if (devname_r(st.st_rdev, type, name, __arraycount(name)))
+  if (devname_r(st.st_rdev, type, name, sizeof(name)))
     exit(1);
 
   printf("%s\n", name);

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/fgetln.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fgetln.cc Fri Mar 23 14:44:59 2018
@@ -1,4 +1,5 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t
+// UNSUPPORTED: linux
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc?rev=328376&r1=328375&r2=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getpass.cc Fri Mar 23 14:44:59 2018
@@ -5,13 +5,19 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <string.h>
 #if __linux__
 #include <pty.h>
+#elif defined(__FreeBSD__)
+#include <libutil.h>
+#include <pwd.h>
+#include <sys/ioctl.h>
+#include <sys/termios.h>
+#include <sys/types.h>
 #else
 #include <util.h>
 #endif
+#include <unistd.h>
 
 int
 main (int argc, char** argv)

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/lstat.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lstat.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
    (empty)

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcat.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcat.cc Fri Mar 23 14:44:59 2018
@@ -1,5 +1,7 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t
 
+// UNSUPPORTED: linux
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

Copied: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc (from r328375, compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc?p2=compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc&p1=compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc&r1=328375&r2=328376&rev=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/strlcpy.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/strlcpy.cc Fri Mar 23 14:44:59 2018
@@ -1,5 +1,7 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t
 
+// UNSUPPORTED: linux
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

Modified: compiler-rt/trunk/test/sanitizer_common/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg?rev=328376&r1=328375&r2=328376&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/lit.common.cfg (original)
+++ compiler-rt/trunk/test/sanitizer_common/lit.common.cfg Fri Mar 23 14:44:59 2018
@@ -59,5 +59,5 @@ config.substitutions.append( ('%env_tool
 
 config.suffixes = ['.c', '.cc', '.cpp']
 
-if config.host_os not in ['Linux', 'Darwin', 'NetBSD']:
+if config.host_os not in ['Linux', 'Darwin', 'NetBSD', 'FreeBSD']:
   config.unsupported = True




More information about the llvm-commits mailing list