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