aboutsummaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-24 18:39:07 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 18:39:07 -0500
commit1f41fab371d95201158f3b2811849723a3953c3c (patch)
tree4c27f6cd41373aec8f45ef8f0491e8ddd8be1dd5 /test/meson.build
parent6fcd79be0c1d38eadabec9993e65725ce7bf600c (diff)
downloadlv2-1f41fab371d95201158f3b2811849723a3953c3c.tar.xz
Suppress GCC Wstringop-overflow warning in atom overflow test
In release builds, GCC 14.2.1 reports "error: writing 4 bytes into a region of size between 18446744073709551581 and 3". I'm pretty sure this is a compiler bug: the message suggests an underflow, the flagged code does have an overflow check (being the whole point of the test), and the test passes in both ASan and Valgrind.
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/meson.build b/test/meson.build
index f782441..502a44c 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -157,6 +157,11 @@ test_names = [
'forge_overflow',
]
+atom_test_suppressions = []
+if warning_level == 'everything' and cc.get_id() == 'gcc'
+ atom_test_suppressions += ['-Wno-stringop-overflow']
+endif
+
# Build and run tests
foreach test_name : test_names
test(
@@ -164,7 +169,7 @@ foreach test_name : test_names
executable(
test_name,
files('test_@0@.c'.format(test_name)),
- c_args: c_suppressions,
+ c_args: c_suppressions + atom_test_suppressions,
dependencies: [lv2_dep],
),
suite: 'unit',