Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: ignore *.syso files in -msan mode #21884
Packages with syso files currently fail in -msan mode because the syso file calls out to a routine like memcmp which then falsely reports uninitialized memory.
It's not possible to prepare a syso file that works regardless of memory-sanitizer setting, at least not if the code makes any memory writes, which most code does. Instead you'd have to prepare both a standard syso and an msan-enabled syso, and the go command conventions provide no way to tell those apart.
I suggest we simply ignore syso files in -msan mode. That will result in missing link symbols, but then package authors can revise their packages to avoid the syso in -msan mode. That gives package authors at least one way to write a package that has a syso and still works with -msan. Today there are zero ways.
A more complex change would be to introduce a new class of objects like *.syso.msan or *_msan.syso, but let's not do that until there's a compelling reason. In the case where this came up, the "ignore syso files" is good enough.
There is instruction how to add .icon based on .syso and not working
In any case of .syso looks not working