Tech article
Data races and the limits of ThreadSanitizer in C and Go
No preview is available. Read the original article for the full story.
Hacker News | Sep 13, 2026 | matt_d
Automated excerpt
ThreadSanitizer (TSan) is not well documented. And now with TSan. $ gcc -g -fsanitize=thread no_sync. c #0 t2 /root/no_sync. c:11 (a. out+0x12bd) (BuildId: a50e60b6ecef90977bab7057915cbe47fdf5aecc) #0 t1 /root/no_sync. c:6 (a. out+0x1274) (BuildId: a50e60b6ecef90977bab7057915cbe47fdf5aecc) Location is global 'x' of size 4 at 0x556f51049014 (a. out+0x4014) #0 pthread_create .. /.. /.. /.. /src/libsanitizer/tsan/tsan_interceptors_posix. cpp:1022 (libtsan. so. 2+0x5ac1a) (BuildId: 2a13a7710e361d06f7babbea53065ca2be93f738) #1 main /root/no_sync. c:18 (a. out+0x134d) (BuildId: a50e60b6ecef90977bab7057915cbe47fdf5aecc) #0 pthread_create .. /.. /.. /.. /src/libsanitizer/tsan/tsan_interceptors_posix. cpp:1022 (libtsan. so. 2+0x5ac1a) (BuildId: 2a13a7710e361d06f7babbea53065ca2be93f738) #1 main /root/no_sync. c:17 (a. out+0x1330) (BuildId: a50e60b6ecef90977bab7057915cbe47fdf5aecc) SUMMARY: ThreadSanitizer: data race /root/no_sync. c:11 in t2 Let’s catch this race ourselves!
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.