1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:34:39 -07:00

runtime: use right mask to extract type kind

Cleanup from recent malloc changes.

LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/120960043
This commit is contained in:
Keith Randall 2014-07-31 09:32:09 -07:00
parent cecca43804
commit 1e0b378905

View File

@ -34,7 +34,7 @@ func RaceSemrelease(s *uint32)
const raceenabled = true
func raceReadObjectPC(t *_type, addr unsafe.Pointer, callerpc, pc uintptr) {
kind := t.kind &^ kindNoPointers
kind := t.kind & kindMask
if kind == kindArray || kind == kindStruct {
// for composite objects we have to read every address
// because a write might happen to any subobject.