diff --git a/tests/meson.build b/tests/meson.build index a02648e48cb86b766daef4986b5769dc68b4228d..b7d3ddce413185878fdd10cb15320494e61c442e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -34,6 +34,14 @@ tests = { undef_ndebug = '-UNDEBUG' test_dep = [thread_dep] +test_env = environment( + { + # Set glibc's MALLOC_PERTURB to 1. This means that newly allocated + # memory will be initialized with 0x01, and that free'ed memory + # will be set to 0xFE (I think). + 'MALLOC_PERTURB_': '1', + } +) foreach source, test_dict : tests # TODO: Use meson fs (filesystem) module once meson >= 0.53 is in @@ -55,6 +63,7 @@ foreach source, test_dict : tests test_exe, is_parallel: test_dict.get('is_parallel', true), suite: test_dict.get('test_suite', 'all'), - timeout: 60 + timeout: 60, + env: test_env, ) endforeach