mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-27 07:58:47 -04:00
Merge branch 'asan' into 'main'
Suppress spurious asan errors See merge request wayland/wayland!154
This commit is contained in:
commit
e82f9ce674
1 changed files with 10 additions and 2 deletions
|
|
@ -37,11 +37,18 @@ struct test {
|
||||||
int must_fail;
|
int must_fail;
|
||||||
} __attribute__ ((aligned (16)));
|
} __attribute__ ((aligned (16)));
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
#define SUPPRESS_ASAN __attribute__ ((no_sanitize("address")))
|
||||||
|
#else
|
||||||
|
#define SUPPRESS_ASAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TEST(name) \
|
#define TEST(name) \
|
||||||
static void name(void); \
|
static void name(void); \
|
||||||
\
|
\
|
||||||
const struct test test##name \
|
const struct test test##name \
|
||||||
__attribute__ ((used, section ("test_section"))) = { \
|
SUPPRESS_ASAN \
|
||||||
|
__attribute__ ((used, section ("test_section"))) = { \
|
||||||
#name, name, 0 \
|
#name, name, 0 \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
|
|
@ -51,7 +58,8 @@ struct test {
|
||||||
static void name(void); \
|
static void name(void); \
|
||||||
\
|
\
|
||||||
const struct test test##name \
|
const struct test test##name \
|
||||||
__attribute__ ((used, section ("test_section"))) = { \
|
SUPPRESS_ASAN \
|
||||||
|
__attribute__ ((used, section ("test_section"))) = { \
|
||||||
#name, name, 1 \
|
#name, name, 1 \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue