This is something I just copied from https://reviews.llvm.org/source/llvm-github/browse/master/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cpp, but cannot find a reference why exactly darwin and tsan are problem.
I can see that trying to instrument both thread and coverage emits a warning about just ignoring the latter (a.cc is just some helloworld code).
The i38c-darwin was there from the version#0 of that^ file. Although originally it had more entries, some of which got removed in https://reviews.llvm.org/rGdd862f9106199ce2dd04ebc93e9bfd203465c1ee.
Not really sure what to comment beside // Kept same as 'sanitizer_coverage_inline8bit_counter.cpp'
I realized only now that I didn't update a few files in compiler-rt that provides weak, empty implementations:
(the last one was the reason of the fuzzer failure on the previous diff I guess)
Should I add them in this diff (/ another diff / not necessary)?
It looks like this change breaks some macOS builds, e.g. http://green.lab.llvm.org/green/job/clang-stage1-RA/8593/
I’ve disabled it for x86_64-darwin as well (it was already unsupported for i386-darwin) in d6525eff5ebfa0ef1d6cd75cb9b40b1881e7a707
It would be great if you could take a look.
Sorry for the breakage; the problematic section was added in D77244 (SanCovBoolFlagSectionName in llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp). I was wondering why the previous section name was dropping the vowels, but didn't realize that there was a character restriction.
If you think just shortening the name to something like sancov_bools would be sufficient, I can send a diff (, how do I test it for mac builds though?).