Does this issue reproduce with the latest release?
It's not an issue, just curiosity.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
Reading the source code of runtime.
What did you expect to see?
Read/write operation on gp.stackguard0 does not require any atomic operations.
What did you see instead?
Atomic operations on gp.stackguard0 are used in only one place: runtime/stack.go.
......// NOTE: stackguard0 may change underfoot, if another thread// is about to try to preempt gp. Read it just once and use that same// value now and below.preempt:=atomic.Loaduintptr(&gp.stackguard0) ==stackPreempt......
If there is a data race, why not all use atomic operations?
The text was updated successfully, but these errors were encountered:
For asking questions about learning the language, see one of our forums: https://golang.org/wiki/Questions. We only use this issue tracker for tracking bugs. People in the forums can explain what is happening here.