You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, the race detector runtime is sensitive to the version of the C compiler installed; as of Go 1.21, building a program with -race requires a C compiler that incorporates version 8 or later of the mingw-w64 runtime libraries. You can test your C compiler by invoking it with the arguments --print-file-name libsynchronization.a. A newer compliant C compiler will print a full path for this library, whereas older C compilers will just echo the argument.
According to the documentation, version 8 of the mingw-w64 runtime libraries should work, as it is the minimum required version ("version 8 or later"). However, it doesn't seem to work.
I have tested using Github Actions runners for Windows. Github actions supports 2 runners: windows-2019 (which comes with Mingw-w64 8.1.0), and windows-2022 (which comes with Mingw-w64 11.2.0). I can run the race detector successfully with the latter (windows-2022), but not with the former (windows-2019). When using ``windows-2019andMingw-w64 8.1.0`, the observed error is the same as for #61058: `exit status 0xc0000139`.
Run gcc --print-file-name libsynchronization.a
I don't know what the exact requirement is, but 8.1.0 does not work (unless some other dependency is at fault).
Installed software on Github Actions Windows runners: