3 ms·
Unfortunately tsan is a pretty big performance hit (5x-15x with 5x-10x increase in memory) and has a non-zero false positive rate. So it’s not a “use almost alw
by moregrist 3y ago
Unfortunately tsan is a pretty big performance hit (5x-15x with 5x-10x increase in memory) and has a non-zero false positive rate. So it’s not a “use almost always during development thing” like the address sanitizer is.
That said, it’s can be really helpful when you suspect a race condition.
- 1over137 3y agoIn my experience, it has a near-zero false positive rate though.
- intelVISA 3y agoAfter enough YOE you can perform tsan-like static analysis just by reading the code.
- nayuki 3y agoYOE = years of experience
- adrianN 3y agoMaybe if you work on a tiny codebase.
- UncleMeat 3y agoGiven how many times I've seen people on the C++ standards committee make a concurrency mistake, I don't believe you. Thread safety is extraordinarily difficult to reason about by looking at code once you've moved beyond very basic designs. Tsan is also not static analysis.