TSan has a re-implementation of pthread_once in its interceptor, which assumes that the pthread_once_t *once_control pointer is actually pointing to a "storage" which is zero-initialized and used for the atomic operations. However, that's not true on OS X, where pthread_once_t is a structure, that contains a header (with a magic value) and the actual storage follows after that. This patch skips the header to make the interceptor work on OS X.
Details
Details
Diff Detail
Diff Detail