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 @@ -580,14 +580,22 @@ function main(): void
580
580
$ environment ['USE_TRACKED_ALLOC ' ] = 1 ;
581
581
$ environment ['SKIP_ASAN ' ] = 1 ;
582
582
$ environment ['SKIP_PERF_SENSITIVE ' ] = 1 ;
583
+ $ lsan_options = [];
583
584
if ($ switch === '--msan ' ) {
584
585
$ 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 ' ;
585
591
}
586
-
587
592
$ lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt ' ;
588
593
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 );
591
599
}
592
600
break ;
593
601
case '--repeat ' :
You can’t perform that action at this time.
0 commit comments