]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: use right mask to extract type kind
authorKeith Randall <khr@golang.org>
Thu, 31 Jul 2014 16:32:09 +0000 (09:32 -0700)
committerKeith Randall <khr@golang.org>
Thu, 31 Jul 2014 16:32:09 +0000 (09:32 -0700)
Cleanup from recent malloc changes.

LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/120960043

src/pkg/runtime/race.go

index bdb7193ffb83eb1c6f70d08cdc198dd06a4f9e1e..3707549a3fd8700a07e02fa512cd45d934fe7610 100644 (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.