File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -578,14 +578,22 @@ function main(): void
578
578
$ environment ['USE_TRACKED_ALLOC ' ] = 1 ;
579
579
$ environment ['SKIP_ASAN ' ] = 1 ;
580
580
$ environment ['SKIP_PERF_SENSITIVE ' ] = 1 ;
581
+ $ lsan_options = [];
581
582
if ($ switch === '--msan ' ) {
582
583
$ environment ['SKIP_MSAN ' ] = 1 ;
584
+ // use_tls=0 is a workaround for MSAN crashing with "Tracer caught signal 11" (SIGSEGV),
585
+ // which seems to be an issue with TLS support in newer glibc versions under virtualized
586
+ // environments. Follow https://github.com/google/sanitizers/issues/1342 and
587
+ // https://github.com/google/sanitizers/issues/1409 to track this issue.
588
+ $ lsan_options [] = 'use_tls=0 ' ;
583
589
}
584
-
585
590
$ lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt ' ;
586
591
if (file_exists ($ lsanSuppressions )) {
587
- $ environment ['LSAN_OPTIONS ' ] = 'suppressions= ' . $ lsanSuppressions
588
- . ':print_suppressions=0 ' ;
592
+ $ lsan_options [] = 'suppressions= ' . $ lsanSuppressions ;
593
+ $ lsan_options [] = 'print_suppressions=0 ' ;
594
+ }
595
+ if (!empty ($ lsan_options )) {
596
+ $ environment ['LSAN_OPTIONS ' ] = join (': ' , $ lsan_options );
589
597
}
590
598
break ;
591
599
case '--repeat ' :
You can’t perform that action at this time.
0 commit comments