summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2021-08-03 14:35:04 +0100
committerDaniel Stone <daniels@collabora.com>2021-08-03 18:42:25 +0100
commitccb64f301c9d4fda66ee1466a188281fbc5c9d93 (patch)
tree78e808709645e2846d2885dbfb605ef62881dbb8 /tools
parentfa6ae44719aff32e8b6ce794d75f78a8e91c9063 (diff)
downloadweston-ccb64f301c9d4fda66ee1466a188281fbc5c9d93.tar.gz
tests: Bump alignment for test structures to 64 bytes
Our core test structure is 36 bytes wide. Declaring it with a 32-bit alignment should thus stripe it to 64 bytes. For some reason, clang+lld lays them out with a 96-byte stride within the section (does it want an entire 32-bit word when building with ASan?), getting the code wildly confused when it tries to step through the structures. So we could fix all our tests to avoid the fragile section dance, or we could just waste another 4 bytes per test definition by bumping the alignment up to 64 bytes, which seems to do enough to magically accord with what clang+lld+ASan expect. Signed-off-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/zunitc/inc/zunitc/zunitc_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/zunitc/inc/zunitc/zunitc_impl.h b/tools/zunitc/inc/zunitc/zunitc_impl.h
index f0533689..0bb5acb4 100644
--- a/tools/zunitc/inc/zunitc/zunitc_impl.h
+++ b/tools/zunitc/inc/zunitc/zunitc_impl.h
@@ -77,7 +77,7 @@ struct zuc_registration {
zucimpl_test_fn fn; /**< function implementing base test. */
zucimpl_test_fn_f fn_f; /**< function implementing test with
fixture. */
-} __attribute__ ((aligned (32)));
+} __attribute__ ((aligned (64)));
int