[Openmp-commits] [PATCH] D13072: [OpenMP] Enable ThreadSanitizer to check OpenMP programs

Simone via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 23 14:06:01 PDT 2015


simoatze added a comment.



In http://reviews.llvm.org/D13072#252137, @hfinkel wrote:

> Thanks for working on this; I'm very excited to see this functionality!
>
> As a general comment, can you always define ANNOTATE_* macros, and just make them empty if TSAN_SUPPORT is not true. What would make things less verbose.


The dynamic annotations have a DYNAMIC_ANNOTATIONS_ENABLED macro to define or not the annotations.
I introduced the TSAN_SUPPORT macro to give a better idea that they are related for supporting ThreadSanitizer.
I just modified the patch setting by default DYNAMIC_ANNOTATIONS_ENABLED=1 so the annotations will be enabled by setting TSAN_SUPPORT to TRUE.
Is that what you meant?

> 

> 

> > The building will generate a library called libomp_tsan.so.

> 

> >  I guess this is not something that we want, so probably it should be removed, but I will leave it for the first review.

> 

> 

> Why would this not be desirable? What's the alternative?


Generating the libomp_tsan.so wouldn't require to modify clang to accept a different library name (besides libomp, libgomp and libiomp5)?
I noticed that if I compile with -fopenmp=libomp_tsan it complains because clang does not know libomp_tsan.so.
Maybe the right thing is just to have one library "libomp.so" and the user would decide to activate Tsan support or not at compile time.


http://reviews.llvm.org/D13072





More information about the Openmp-commits mailing list