Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

GCC TSan (Re: CVS commit: src/tests/usr.bin)



On 15.09.2020 07:03, Martin Husemann wrote:
> On Mon, Sep 14, 2020 at 03:17:53PM +0000, Kamil Rytarowski wrote:
>> Enable TSan tests for GCC and >32bit address space environments
> 
> Since tsan does not work on all architectures, this is not a good idea.
> It would be better to code it with an explicit list of architectures
> supported.
> 
> Martin
> 

I've tried to mark the TSan parts that need porting as explicit failure,
soo we can reduce the risk of shipping unported runtime.

There are generally three such parts:

 - address space memory mappings
 - setjmp mapping of stack pointer
 - setjmp/longjmp assembly code

I noted that not all ATF TSan tests pass for GCC amd64. I suspect that
the runtime is still too old (even older than Clang-7 2 years ago, when
we added the ATF tests).

Another difference is that LLVM by default links the runtime statically
and GCC dynamically. There is a crash with dl_iterate_phdr(3). This is
possibly related to the crash with -pg.

GCC requires to deliver .spec files for static linking of sanitizers. We
need to generate libsanitizer.spec and install it to /usr/lib/. I will
have a look into it.

GCC9 also wants to install libasan_preinit.o, liblsan_preinit.o,
libtsan_preinit.o. I'm going to prepare appropriate build rules for them.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index