Presentation given at OCaml Workshop 2023 from ICFP 2023, on Saturday 9 Sep 2023.
The possibility to write truly parallel OCaml code brings forth new possibilities of bugs. Among those, data races (concurrent accesses to the same data) are hard to detect and dangerous, as they are non-deterministic, possibly silent, and can lead to highly unexpected results. ThreadSanitizer (TSan) is an open-source library and program instrumentation pass to reliably detect data races at runtime. TSan has been instrumental in finding thousands of data races across many programming languages. We will describe the core principles of data race detection in TSan, explain why it was challenging to apply it to OCaml, and the adaptations needed to the runtime system. We plan to demo how you can already use it in your own code, and explain the limitations to be aware of.
- Olivier Nicole: @OlivierNicole and www
- Fabrice Buoro: @fabbing
The rendered extended abstract and typst sources.
The rendered slides and LaTeX sources.
The recording of the presentation is available at https://www.youtube.com/watch?v=zr9S0Fr_Chc.