diff options
| author | Rye <rye@alchemyviewer.org> | 2025-10-27 02:55:56 -0400 |
|---|---|---|
| committer | Rye <rye@alchemyviewer.org> | 2025-10-27 04:59:16 -0400 |
| commit | e803bbc0db695abe73de9797510ba22646528e23 (patch) | |
| tree | a3aa818fa4768b40df9223fb5922aa27ac2a21a7 /indra/llmath/tests/alignment_test.cpp | |
| parent | b1a96885492b65fe0636bf1184f5a8fbfe7b3930 (diff) | |
Modernize viewer alignment macros to use alignas and fix misaligned class issues reported by ubsan/asan
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/llmath/tests/alignment_test.cpp')
| -rw-r--r-- | indra/llmath/tests/alignment_test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index eb6fa4a3b8..f41ebe82aa 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -46,8 +46,7 @@ typedef test_group<alignment_test> alignment_test_t; typedef alignment_test_t::object alignment_test_object_t; tut::alignment_test_t tut_alignment_test("LLAlignment"); -LL_ALIGN_PREFIX(16) -class MyVector4a +class alignas(16) MyVector4a { public: void* operator new(size_t size) @@ -71,7 +70,7 @@ public: } LLQuad mQ; -} LL_ALIGN_POSTFIX(16); +}; // Verify that aligned allocators perform as advertised. |
