[PATCH] D67503: [compiler-rt] Add ubsan interface header.
pierre gousseau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 08:33:41 PDT 2019
pgousseau created this revision.
pgousseau added reviewers: filcab, gbedwell, kcc, vitalybuka, jdoerfert.
Herald added subscribers: llvm-commits, Sanitizers, mgorny, dberris.
Herald added projects: LLVM, Sanitizers.
This is to document __ubsan_default_options().
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D67503
Files:
compiler-rt/include/CMakeLists.txt
compiler-rt/include/sanitizer/ubsan_interface.h
Index: compiler-rt/include/sanitizer/ubsan_interface.h
===================================================================
--- /dev/null
+++ compiler-rt/include/sanitizer/ubsan_interface.h
@@ -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
Index: compiler-rt/include/CMakeLists.txt
===================================================================
--- compiler-rt/include/CMakeLists.txt
+++ compiler-rt/include/CMakeLists.txt
@@ -13,6 +13,7 @@
sanitizer/scudo_interface.h
sanitizer/tsan_interface.h
sanitizer/tsan_interface_atomic.h
+ sanitizer/ubsan_interface.h
)
set(FUZZER_HEADERS
fuzzer/FuzzedDataProvider.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67503.219926.patch
Type: text/x-patch
Size: 1673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190912/f647a5e1/attachment.bin>
More information about the llvm-commits
mailing list