diff options
author | Keith Randall <khr@golang.org> | 2014-12-22 15:24:30 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2015-01-14 20:44:03 +0000 |
commit | ac15ad8a38130a44f5dfc583a717e71bbdb3aa1f (patch) | |
tree | 014de8efc7603aa20ae529ebf925075a17d72625 | |
parent | 7df87f50660bf51edd88c44cc294c32d39088639 (diff) | |
download | go-ac15ad8a38130a44f5dfc583a717e71bbdb3aa1f.tar.gz go-ac15ad8a38130a44f5dfc583a717e71bbdb3aa1f.zip |
[release-branch.go1.4] runtime: fix nacl build, hashmap overflow field offset was incorrect.
Change-Id: Ieb305b2a4d4ef28d70a8b8ece703f495c5af0529
Reviewed-on: https://go-review.googlesource.com/2051
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit c6669e7af58cb9406226c038b1cadef6e754dc74)
Reviewed-on: https://go-review.googlesource.com/2820
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r-- | src/runtime/hashmap.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/hashmap.go b/src/runtime/hashmap.go index 571f812c4e..791af8cf36 100644 --- a/src/runtime/hashmap.go +++ b/src/runtime/hashmap.go @@ -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 { |