rendercheck: rendercheck.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 3 05:30:47 UTC 2021


 rendercheck.h |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 1a86abd39ddd9320cc6974587785978b394d8cfc
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Feb 2 21:30:31 2021 -0800

    Prevent ASan from placing guards around test structs as we expect them to be laid out sequentially
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>

diff --git a/rendercheck.h b/rendercheck.h
index 4bf62b8..30ced40 100644
--- a/rendercheck.h
+++ b/rendercheck.h
@@ -115,8 +115,15 @@ struct rendercheck_test {
 #define SECTION_END(X)
 #endif
 
+#ifdef __clang__
+#define ATTRIBUTE_NO_ASAN __attribute__((no_sanitize("address")))
+#else
+#define ATTRIBUTE_NO_ASAN /**/
+#endif
+
 #define DECLARE_RENDERCHECK_TEST(name)             \
 	const struct rendercheck_test test_desc_##name \
+	ATTRIBUTE_NO_ASAN \
 	__attribute__ ((used, SECTION ("test_section")))
 
 #define DECLARE_RENDERCHECK_ARG_TEST(arg_name_, long_name_, func_)		\


More information about the xorg-commit mailing list