Index: lib/tsan/rtl/tsan.syms.extra =================================================================== --- lib/tsan/rtl/tsan.syms.extra +++ lib/tsan/rtl/tsan.syms.extra @@ -1,4 +1,5 @@ __tsan_init +__tsan_flush_memory __tsan_read* __tsan_write* __tsan_vptr* Index: lib/tsan/rtl/tsan_interface.h =================================================================== --- lib/tsan/rtl/tsan_interface.h +++ lib/tsan/rtl/tsan_interface.h @@ -32,6 +32,8 @@ // before any instrumented code is executed and before any call to malloc. SANITIZER_INTERFACE_ATTRIBUTE void __tsan_init(); +SANITIZER_INTERFACE_ATTRIBUTE void __tsan_flush_memory(); + SANITIZER_INTERFACE_ATTRIBUTE void __tsan_read1(void *addr); SANITIZER_INTERFACE_ATTRIBUTE void __tsan_read2(void *addr); SANITIZER_INTERFACE_ATTRIBUTE void __tsan_read4(void *addr); Index: lib/tsan/rtl/tsan_interface.cc =================================================================== --- lib/tsan/rtl/tsan_interface.cc +++ lib/tsan/rtl/tsan_interface.cc @@ -28,6 +28,10 @@ Initialize(cur_thread()); } +void __tsan_flush_memory() { + FlushShadowMemory(); +} + void __tsan_read16(void *addr) { MemoryRead(cur_thread(), CALLERPC, (uptr)addr, kSizeLog8); MemoryRead(cur_thread(), CALLERPC, (uptr)addr + 8, kSizeLog8);