diff --git a/src/common/WorkerThread.cpp b/src/common/WorkerThread.cpp index 53ec0e5a2d9..fca2084c6a4 100644 --- a/src/common/WorkerThread.cpp +++ b/src/common/WorkerThread.cpp @@ -10,6 +10,8 @@ #include "common/WorkerThread.h" +#include "common/angleutils.h" + // Controls if our threading code uses std::async or falls back to single-threaded operations. // Note that we can't easily use std::async in UWPs due to UWP threading restrictions. #if !defined(ANGLE_STD_ASYNC_WORKERS) && !defined(ANGLE_ENABLE_WINDOWS_UWP) @@ -260,6 +262,7 @@ class DelegateWorkerTask std::shared_ptr mWaitable; }; +ANGLE_NO_SANITIZE_CFI_ICALL std::shared_ptr DelegateWorkerPool::postWorkerTask(std::shared_ptr task) { // Thread safety: This function is thread-safe because the |postWorkerTask| platform method is diff --git a/src/common/angleutils.h b/src/common/angleutils.h index 0f82893a7fa..529f4429cc5 100644 --- a/src/common/angleutils.h +++ b/src/common/angleutils.h @@ -529,6 +529,13 @@ class MsanScopedDisableInterceptorChecks final : angle::NonCopyable # define ANGLE_NO_SANITIZE_THREAD #endif +// Similar to the above, but for cfi-icall. +#ifdef __clang__ +# define ANGLE_NO_SANITIZE_CFI_ICALL __attribute__((no_sanitize("cfi-icall"))) +#else +# define ANGLE_NO_SANITIZE_CFI_ICALL +#endif + // The below inlining code lifted from V8. #if defined(__clang__) || (defined(__GNUC__) && defined(__has_attribute)) # define ANGLE_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))