On Sun, 30 Nov 2025 at 10:47, diego peralta huerta
<
diego...@hotmail.com> wrote:
>
> Hello,
> My name is Diego Peralta and I am currently working on a research report about dynamic data race detection techniques, with a particular focus on the evolution of ThreadSanitizer.
> I have thoroughly studied the original ThreadSanitizer paper (“ThreadSanitizer: data race detection in practice”), as well as the hybrid algorithm description used in the Valgrind-based implementation. However, as far as I understand, the modern LLVM/Clang version of TSan uses a significantly different internal design (e.g., epoch-based happens-before tracking, shadow memory layout, fast-path metadata storage, etc.), and I am trying to locate documentation that describes these mechanisms in a level of detail comparable to the first TSan publication.
> I would like to ask if there is any technical report, article, internal document, design note, or presentation that explains the current implementation of TSan in depth—particularly the runtime algorithm, shadow memory structure, fast-path/slow-path logic, and happens-before enforcement as it exists today.
> If such documentation exists, I would be grateful if you could share it or point me to where I can find it. It would greatly help me ensure that my research accurately reflects the current state of the tool.
> Thank you very much for your time, and please let me know if I can provide any additional context.
> Best regards,
> Diego Peralta
Hi Diego,
Yes, the current tsan is radically different from what is described in
the oid tsan paper.
The largest major overhaul happened in 2021:
https://reviews.llvm.org/D112603
But even before that it was very different.
Currently there are no docs beyond the code.