Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/common/attributes.h6
-rw-r--r--src/lib.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h
index 6fa1300..4bd8217 100644
--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -92,6 +92,12 @@
#define NOINLINE __attribute__((noinline))
#endif /* !_MSC_VER */
+#ifdef __clang__
+#define NO_SANITIZE(x) __attribute__((no_sanitize(x)))
+#else
+#define NO_SANITIZE(x)
+#endif
+
#if defined(NDEBUG) && (defined(__GNUC__) || defined(__clang__))
#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
#elif defined(NDEBUG) && defined(_MSC_VER)
diff --git a/src/lib.c b/src/lib.c
index 0107c2d..c56c4cd 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -79,6 +79,7 @@ COLD void dav1d_default_settings(Dav1dSettings *const s) {
static void close_internal(Dav1dContext **const c_out, int flush);
+NO_SANITIZE("cfi-icall") // CFI is broken with dlsym()
COLD int dav1d_open(Dav1dContext **const c_out, const Dav1dSettings *const s) {
static pthread_once_t initted = PTHREAD_ONCE_INIT;
pthread_once(&initted, init_internal);