TSan reports lots of false-positive races when multiple threads use
thr_calloc (due to memset accessing the same data without a lock visible
to TSan). To avoid these false-positives this patch calls the tsan_mutex_*
API to notify TSan about the internal locking around malloc(). These are
implemented as weak no-op functions so that the TSan runtime can override
them with the real implementation.
Another option to silence these issues would be to avoid calls to
intercepted functions from within thr_calloc(), etc. Possibly providing
a libthr-internal memset() would be sufficient since all false-positive
backtraces I've seen so far come from the memset() call inside thr_calloc.