Skip to content

Commit

Permalink
mtest: set MSAN_OPTIONS to abort by default
Browse files Browse the repository at this point in the history
Followup to 7b7d2e0 which handles ASAN and UBSAN.

It turns out that MSAN needs the same treatment. I've checked other sanitizers
like HWASAN and TSAN - it looks like they may both need it too, but Meson doesn't
currently suppose those anyway (see mesonbuild#12648).

(TODO: Should we just set those anyway pre-emptively?)
(TODO: docs)

Signed-off-by: Sam James <sam@gentoo.org>
  • Loading branch information
thesamesam committed Feb 10, 2024
1 parent 4c27c50 commit a93674c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mesonbuild/mtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,8 @@ def __init__(self, test: TestSerialisation, env: T.Dict[str, str], name: str,
env['ASAN_OPTIONS'] = 'halt_on_error=1:abort_on_error=1:print_summary=1'
if ('UBSAN_OPTIONS' not in env or not env['UBSAN_OPTIONS']):
env['UBSAN_OPTIONS'] = 'halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1'
if ('MSAN_OPTIONS' not in env or not env['MSAN_OPTIONS']):
env['UBSAN_OPTIONS'] = 'halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1'

if self.options.gdb or self.test.timeout is None or self.test.timeout <= 0:
timeout = None
Expand Down

0 comments on commit a93674c

Please sign in to comment.