tsan: fix crash when data race happens on out-of-bounds accesses.