[PATCH] D43894: [2/3] OpenBSD UBsan support / ubsan part

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 12:52:11 PST 2018


devnexen created this revision.
devnexen added reviewers: krytarowski, kettenis, visa, vitalybuka.
Herald added subscribers: Sanitizers, llvm-commits, fedor.sergeev, kubamracek.

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43894

Files:
  lib/ubsan/ubsan_init.cc
  lib/ubsan/ubsan_platform.h


Index: lib/ubsan/ubsan_platform.h
===================================================================
--- lib/ubsan/ubsan_platform.h
+++ lib/ubsan/ubsan_platform.h
@@ -15,8 +15,8 @@
 
 // Other platforms should be easy to add, and probably work as-is.
 #if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) ||        \
-    defined(__NetBSD__) || (defined(__sun__) && defined(__svr4__)) ||          \
-    defined(_WIN32) || defined(__Fuchsia__)
+    defined(__NetBSD__) || defined(__OpenBSD__) || \
+    (defined(__sun__) && defined(__svr4__)) || defined(_WIN32) || defined(__Fuchsia__)       
 # define CAN_SANITIZE_UB 1
 #else
 # define CAN_SANITIZE_UB 0
Index: lib/ubsan/ubsan_init.cc
===================================================================
--- lib/ubsan/ubsan_init.cc
+++ lib/ubsan/ubsan_init.cc
@@ -40,7 +40,9 @@
   InitializeFlags();
   __sanitizer_set_report_path(common_flags()->log_path);
   AndroidLogInit();
+#if !SANITIZER_OPENBSD
   InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir);
+#endif
   CommonInit();
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43894.136366.patch
Type: text/x-patch
Size: 1080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180228/b1908f75/attachment.bin>


More information about the llvm-commits mailing list