Let's work! Computation, entering f Entering g In exception handler ================== WARNING: ThreadSanitizer: data race (pid=) Read of size 8 at by thread T1 (mutexes: write M): #0 camlRaise_through_handler$reader_ () #1 camlStdlib__Domain$body_ () Previous write of size 8 at by main thread (mutexes: write M): #0 camlRaise_through_handler$race_ () #1 camlRaise_through_handler$main_ () #2 camlRaise_through_handler$entry () #3 caml_program () As if synchronized via sleep: #0 nanosleep () #1 wg_wait () #2 camlRaise_through_handler$reader_ () #3 camlStdlib__Domain$body_ () Mutex M () created at: #0 pthread_mutex_init () #1 caml_plat_mutex_init () #2 caml_init_domains () #3 caml_init_gc () Mutex M () created at: #0 pthread_mutex_init () #1 caml_plat_mutex_init () #2 caml_init_domains () #3 caml_init_gc () Thread T1 (tid=, running) created by main thread at: #0 pthread_create () #1 caml_domain_spawn () #2 caml_c_call () #3 camlStdlib__Domain$spawn_ () #4 camlRaise_through_handler$entry () #5 caml_program () SUMMARY: ThreadSanitizer: data race (:) in camlRaise_through_handler$reader_ ================== Result = 44 ThreadSanitizer: reported 1 warnings