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:
authorHenrik Gramner <gramner@twoorioles.com>2020-01-09 19:29:47 +0300
committerHenrik Gramner <henrik@gramner.com>2020-01-10 05:08:18 +0300
commitc192e0db24f01a3ea0ea32992fd0171c96ecca3a (patch)
tree03a23978dcfc7dd53e25078c0f95d5080a1a4d95 /include
parent5462c2a80de6f7f6c0b1b0d20cbe571b09510a19 (diff)
Add a workaround for -fsanitize=cfi + dlsym() issue
CFI will SIGILL when calling a function pointer obtained through dlsym(), regardless of whether or not the signature is correct. See https://bugs.llvm.org/show_bug.cgi?id=44500
Diffstat (limited to 'include')
-rw-r--r--include/common/attributes.h6
1 files changed, 6 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)