[compiler-rt] r371822 - [compiler-rt] Add ubsan interface header.

Pierre Gousseau via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 01:22:58 PDT 2019


Author: pgousseau
Date: Fri Sep 13 01:22:58 2019
New Revision: 371822

URL: http://llvm.org/viewvc/llvm-project?rev=371822&view=rev
Log:
[compiler-rt] Add ubsan interface header.

This is to document __ubsan_default_options().

Reviewed By: vitalybuka

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

Added:
    compiler-rt/trunk/include/sanitizer/ubsan_interface.h
Modified:
    compiler-rt/trunk/include/CMakeLists.txt

Modified: compiler-rt/trunk/include/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/include/CMakeLists.txt?rev=371822&r1=371821&r2=371822&view=diff
==============================================================================
--- compiler-rt/trunk/include/CMakeLists.txt (original)
+++ compiler-rt/trunk/include/CMakeLists.txt Fri Sep 13 01:22:58 2019
@@ -13,6 +13,7 @@ if (COMPILER_RT_BUILD_SANITIZERS)
     sanitizer/scudo_interface.h
     sanitizer/tsan_interface.h
     sanitizer/tsan_interface_atomic.h
+    sanitizer/ubsan_interface.h
     )
   set(FUZZER_HEADERS
     fuzzer/FuzzedDataProvider.h

Added: compiler-rt/trunk/include/sanitizer/ubsan_interface.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/include/sanitizer/ubsan_interface.h?rev=371822&view=auto
==============================================================================
--- compiler-rt/trunk/include/sanitizer/ubsan_interface.h (added)
+++ compiler-rt/trunk/include/sanitizer/ubsan_interface.h Fri Sep 13 01:22:58 2019
@@ -0,0 +1,32 @@
+//===-- sanitizer/ubsan_interface.h -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of UBSanitizer (UBSan).
+//
+// Public interface header.
+//===----------------------------------------------------------------------===//
+#ifndef SANITIZER_UBSAN_INTERFACE_H
+#define SANITIZER_UBSAN_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/// User-provided default option settings.
+///
+/// You can provide your own implementation of this function to return a string
+/// containing UBSan runtime options (for example,
+/// <c>verbosity=1:halt_on_error=0</c>).
+///
+/// \returns Default options string.
+const char* __ubsan_default_options(void);
+
+#ifdef __cplusplus
+}  // extern "C"
+#endif
+
+#endif  // SANITIZER_UBSAN_INTERFACE_H




More information about the llvm-commits mailing list