Skip to content

ThreadSanitizer Clang 7

Viktor Ostashevskyi edited this page Sep 27, 2018 · 1 revision

ThreadSanitizer options in Clang

Based on:

  • include/clang/Driver/Options.td
  • include/clang/Driver/SanitizerArgs.h and lib/Driver/SanitizerArgs.cpp
Type Name Default value Description
bool -f[no]sanitize-thread-memory-access true Enable memory access instrumentation
bool -f[no]sanitize-thread-func-entry-exit true Enable function entry/exit instrumentation
bool -f[no]sanitize-thread-atomics true Enable atomic operations instrumentation

ThreadSanitizer options in LLVM

This is taken from lib/Transforms/Instrumentation/ThreadSanitizier.cpp

Type Name Default value Description Notes
bool tsan-instrument-memory-accesses true Instrument memory accesses Driver option is -f[no]sanitize-thread-memory-access
bool tsan-instrument-func-entry-exit true Instrument function entry and exit Driver option is -f[no]sanitize-thread-func-entry-exit
bool tsan-handle-cxx-exceptions true Handle C++ exceptions (insert cleanup blocks for unwinding)
bool tsan-instrument-atomics true Instrument atomics Driver option is -f[no]sanitize-thread-atomics
bool tsan-instrument-memintrinsics true Instrument memintrinsics (memset/memcpy/memmove)
Clone this wiki locally