domainslib icon indicating copy to clipboard operation
domainslib copied to clipboard

Possible data races in Chan

Open OlivierNicole opened this issue 2 years ago • 0 comments

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:

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.

OlivierNicole avatar May 31 '22 14:05 OlivierNicole