Possible data races in Chan
OlivierNicole opened this issue · 0 comments
OlivierNicole commented
I'm currently experimenting with a ThreadSanitizer instrumentation pass for OCaml that allows to detect some data races in OCaml programs.
When running Domainslib's test suite, ThreadSanitizer reported two possible data races in lib/chan.ml
:
- One between between the read at line 110 and the write at line 209;
- Another between line 155 and line 89.
Both have a similar pattern. After looking at it, I think they are indeed data races (an unsynchronised read and write), however it seems to me that they are benign in this library, assuming the OCaml memory model. That being said, I could use a confirmation from someone more experienced with the memory model to confirm.