2

I have some code in my project in inline assembly, does TSAN instrument it? let's look at this example:

T0: x++

T1: (inline assembly code) MOV x, 2;

will we get data race here(assuming no sync at all)? if so, does it instrument all assembly memory access such as XADD, etc?

Moshe Levy
  • 174
  • 9
  • 2
    That does not seem to be [documented](https://clang.llvm.org/docs/ThreadSanitizer.html), but my guess would be that ThreadSanitizer does not see into inline assembly. It ought to be fairly easy to test, however. Have you tried? – John Bollinger Feb 15 '23 at 19:05
  • thanks, looks like it doesn't. so an inline assembly code is not checked – Moshe Levy Feb 15 '23 at 19:29

0 Answers0