x/arch/x86/x86asm: race when Decode called concurrently #33532
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?go version go1.12.5 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux amd64
What did you do?
If x86asm.Decode is called in parallel from multiple threads, there is a data race on the "decoderCover" variable. This race can be detected with gotsan. The decoderCover variable appears to be for testing introspection only - the Decode function writes to it without locking and then the test can later examine it. There's a TODO to put it behind a flag, which is probably all that needs to happen. I can probably send a pull request, although I'm not very familiar with writing go.
What did you expect to see?
no tsan issues
What did you see instead?
a data race
The text was updated successfully, but these errors were encountered: