Skip to content

Commit 63525ee

Browse files
committed
use_tls=0 on MSAN
Attempt to fix MSAN failure in CI Closes GH-10851
1 parent b3e28e2 commit 63525ee

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

run-tests.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,22 @@ function main(): void
580580
$environment['USE_TRACKED_ALLOC'] = 1;
581581
$environment['SKIP_ASAN'] = 1;
582582
$environment['SKIP_PERF_SENSITIVE'] = 1;
583+
$lsan_options = [];
583584
if ($switch === '--msan') {
584585
$environment['SKIP_MSAN'] = 1;
586+
// use_tls=0 is a workaround for MSAN crashing with "Tracer caught signal 11" (SIGSEGV),
587+
// which seems to be an issue with TLS support in newer glibc versions under virtualized
588+
// environments. Follow https://github.com/google/sanitizers/issues/1342 and
589+
// https://github.com/google/sanitizers/issues/1409 to track this issue.
590+
$lsan_options[] = 'use_tls=0';
585591
}
586-
587592
$lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt';
588593
if (file_exists($lsanSuppressions)) {
589-
$environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions
590-
. ':print_suppressions=0';
594+
$lsan_options[] = 'suppressions=' . $lsanSuppressions;
595+
$lsan_options[] = 'print_suppressions=0';
596+
}
597+
if (!empty($lsan_options)) {
598+
$environment['LSAN_OPTIONS'] = join(':', $lsan_options);
591599
}
592600
break;
593601
case '--repeat':

0 commit comments

Comments
 (0)