diff options
Diffstat (limited to 'init.cfg')
-rw-r--r-- | init.cfg | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,6 +1,6 @@ # This file is sourced by init.sh, *before* its initialization. -# Copyright (C) 2010-2016 Free Software Foundation, Inc. +# Copyright (C) 2010-2017 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,10 +23,17 @@ stderr_fileno_=9 # which could happen if not installed, # or hasn't support for the built architecture, # or hasn't appropriate error suppressions installed etc. +# or the program under test was compiled with address sanitizer. require_valgrind_() { valgrind --error-exitcode=1 true 2>/dev/null || skip_ "requires a working valgrind" + + # We cannot apply valgrind to an ASAN-enabled executable. + # An ASAN-enabled binary will print this on the first line of + # its help output: Available flags for AddressSanitizer: + ASAN_OPTIONS=help=1 sed qq 2>&1 | grep AddressSanitizer: \ + && skip_ 'ASAN enabled binary cannot work with valgrind' } # Call this with a list of programs under test immediately after |