On OS X, memchr is called on a newly created thread even before __tsan_thread_start_func is invoked, which means that the ThreadState object for that thread will not yet be initialized. Let's add COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED into the interceptor to simply call the original memchr in these cases.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
445 | This is fragile (even if works for you). REAL interceptors are also initializes, so if nothing is initialized REAL(memchr) == 0. Call internal_memchr instead, like other cases do. |
This is fragile (even if works for you). REAL interceptors are also initializes, so if nothing is initialized REAL(memchr) == 0. Call internal_memchr instead, like other cases do.