Hello,
I'm using TSan for iOS. I compiled LLVM 19.1.5 with SANITIZER_DEBUG enabled. I constantly observe the following failure in tsan_sync.cpp. I wanted to ask if you had any idea as to why this might be happening and how to resolve it. Thank you!
ThreadSanitizer: CHECK failed: tsan_sync.cpp:55 "((*meta)) == ((0))" (0x800008e3, 0x0) (tid=3200370)
ThreadSanitizer: CHECK failed: tsan_sync.cpp:55 "((*meta)) == ((0))" (0x800013dc, 0x0) (tid=3200362)
#0 __tsan::CheckUnwind() tsan_rtl.cpp:676 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x5f3c4)
#1 __tsan::CheckUnwind() tsan_rtl.cpp:676 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x5f3c8)
#2 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) sanitizer_termination.cpp:86 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x1aa80)
#3 __tsan::MetaMap::AllocBlock(__tsan::ThreadState*, unsigned long, unsigned long, unsigned long) tsan_sync.cpp:55 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x7fa34)
#4 __tsan::user_alloc_internal(__tsan::ThreadState*, unsigned long, unsigned long, unsigned long, bool) tsan_mman.cpp:218 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x58e58)
#5 __tsan::user_alloc(__tsan::ThreadState*, unsigned long, unsigned long) tsan_mman.cpp:234 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x59798)
#6 malloc sanitizer_malloc_mac.inc:137 (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x56bb8)
#7 _malloc_type_malloc_outlined <null> (libsystem_malloc.dylib:arm64+0xfdb0)
#8 swift_slowAlloc <null> (libswiftCore.dylib:arm64+0x2f8a68)
#9 swift_allocObject <null> (libswiftCore.dylib:arm64+0x2f8d50)
#10 _allocateStringStorage(codeUnitCapacity:) <null> (libswiftCore.dylib:arm64+0x1bb788)
#11 _StringGuts.grow(_:) <null> (libswiftCore.dylib:arm64+0x1a1f5c)
#12 <null> <null> ...
#13 AsyncStream.init(_:bufferingPolicy:_:) <null> (libswift_Concurrency.dylib:arm64+0x259b0)
#14 <null> <null> ...
#15 <null> <null> ...
#16 swift::runJobInEstablishedExecutorContext(swift::Job*) <null> (libswift_Concurrency.dylib:arm64+0x42c4c)