On FreeBSD the libc's %p conversion specifier outputs the pointer value in 0x%x format, that is, without any leading zeros. In contrast, on Linux that specifier works as 0x%012x what matches the RTL's implementation of formatted output:
static int AppendPointer(char **buff, const char *buff_end, u64 ptr_value) { int result = 0; result += AppendString(buff, buff_end, -1, "0x"); result += AppendUnsigned(buff, buff_end, ptr_value, 16, (SANITIZER_WORDSIZE == 64) ? 12 : 8, true); return result; }
As soon as Tsan relies on that code for generating diagnostic messages, it looks the test cases should generate pointer values in this specific format as well and should not assume it matches to what %p would produce.