From 63525ee600806e2b26f9ae4c2200a8963d05d807 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 14 Mar 2023 11:39:39 +0100 Subject: [PATCH] use_tls=0 on MSAN Attempt to fix MSAN failure in CI Closes GH-10851 --- run-tests.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/run-tests.php b/run-tests.php index edfab1f57ad..175e0a5c48e 100755 --- a/run-tests.php +++ b/run-tests.php @@ -580,14 +580,22 @@ function main(): void $environment['USE_TRACKED_ALLOC'] = 1; $environment['SKIP_ASAN'] = 1; $environment['SKIP_PERF_SENSITIVE'] = 1; + $lsan_options = []; if ($switch === '--msan') { $environment['SKIP_MSAN'] = 1; + // use_tls=0 is a workaround for MSAN crashing with "Tracer caught signal 11" (SIGSEGV), + // which seems to be an issue with TLS support in newer glibc versions under virtualized + // environments. Follow https://github.com/google/sanitizers/issues/1342 and + // https://github.com/google/sanitizers/issues/1409 to track this issue. + $lsan_options[] = 'use_tls=0'; } - $lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt'; if (file_exists($lsanSuppressions)) { - $environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions - . ':print_suppressions=0'; + $lsan_options[] = 'suppressions=' . $lsanSuppressions; + $lsan_options[] = 'print_suppressions=0'; + } + if (!empty($lsan_options)) { + $environment['LSAN_OPTIONS'] = join(':', $lsan_options); } break; case '--repeat':