https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265
--- Comment #19 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
oh, I see now, in tsan/tsan_rtl.cc
// Shadow stack maintenance can be replaced with
// stack unwinding during trace switch (which presumably must be faster).
DCHECK_GE(thr->shadow_stack_pos, thr->shadow_stack);
#ifndef TSAN_GO
DCHECK_LT(thr->shadow_stack_pos, thr->shadow_stack_end);
#else
if (thr->shadow_stack_pos == thr->shadow_stack_end)
GrowShadowStack(thr);
#endif
thr->shadow_stack_pos[0] = pc;
thr->shadow_stack_pos++;
I usually build all languages, inclusive go, just for curiosity.
And maybe that defines TSAN_GO ?