[llvm-dev] question about clang ast for tsan

Dmitry Vyukov via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 19 23:15:07 PDT 2017


On Mon, Jun 19, 2017 at 11:57 PM, Tong Chen <chentong at us.ibm.com> wrote:
> Hi,
>
> I am working xlflang project, which translates other compiler's Fortran
> frontend to generate AST for clang. It works fine except for tsan
> (-fsanitize=thread). I did not see any instructmentation cod in .ll file. I
> experimented with c program by generating .ast file first and then compiling
> to executable. It turned out that I have to use -fsanitize=thread flag when
> generating the .ast file. So what need to be done for tsan in ast
> generation?

+llvm-dev mailing list

Hi Tong,

Tsan instrumentation is done by llvm pass for functions marked with
sanitize_thread attribute.
Do you see sanitize_thread attribute on generated llvm asm? If no,
then that's the problem.

What do you do with ast files? Do you pass them to clang? Do you add
-fsanitize=thread when invoking clang?


More information about the llvm-dev mailing list