Hacker News new | comments | show | ask | jobs | submit login

What you described is Thread Sanitizer (clang toolchain). The corresponding valgrind-based tools would be Helgrind and DRD.

ASan can only catch memory errors in C/C++ programs. A memory error is an access outside the allocated memory of an object, e.g. due to incorrect pointer arithmetics. Such errors would otherwise go undetected but can cause all kinds of errors in the program, like corrupted data, crashes etc.

There's some overlap between the two tools. Race conditions often lead to memory errors of the type that ASan can detect. TSan/Helgrind are the way to go if you want to find races that happen to be benign most of the time, or lock ordering problems, or races that lead to non-memory problems.

Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact