]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix nacl build, hashmap overflow field offset was incorrect.
authorKeith Randall <khr@golang.org>
Mon, 22 Dec 2014 23:24:30 +0000 (15:24 -0800)
committerKeith Randall <khr@golang.org>
Mon, 22 Dec 2014 23:25:24 +0000 (23:25 +0000)
Change-Id: Ieb305b2a4d4ef28d70a8b8ece703f495c5af0529
Reviewed-on: https://go-review.googlesource.com/2051
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/hashmap.go

index 14557f8835696a23d64f6242d89f677962eb3ae7..dd3877d21e532c2553a45abbf457e4f3671b6b0d 100644 (file)
@@ -150,10 +150,10 @@ func evacuated(b *bmap) bool {
 }
 
 func (b *bmap) overflow(t *maptype) *bmap {
-       return *(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize) - ptrSize))
+       return *(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize) - regSize))
 }
 func (b *bmap) setoverflow(t *maptype, ovf *bmap) {
-       *(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize) - ptrSize)) = ovf
+       *(**bmap)(add(unsafe.Pointer(b), uintptr(t.bucketsize) - regSize)) = ovf
 }
 
 func makemap(t *maptype, hint int64) *hmap {