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
bradfitz
changed the title
runtime/mbitmap.go: clearMarkedNonAtomic different with clearMarked
runtime: clearMarkedNonAtomic different than clearMarked
Feb 4, 2017
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.7.4
What operating system and processor architecture are you using (
go env
)?linux amd64
The function clearMarked and clearMarkedNonAtomic are defined:
func (m markBits) clearMarked() {
atomic.And8(m.bytep, ^m.mask)
}
func (m markBits) clearMarkedNonAtomic() {
*m.bytep ^= m.mask
}
From the definition, these two functions have different meaning,
*m.bytep ^= m.mask
should changed to
*m.bytep &^= m.mask
Although, clearMarkedNonAtomic never be used.
The text was updated successfully, but these errors were encountered: