Commit ac15ad8a authored by Keith Randall's avatar Keith Randall Committed by Russ Cox

[release-branch.go1.4] runtime: fix nacl build, hashmap overflow field offset was incorrect.

Change-Id: Ieb305b2a4d4ef28d70a8b8ece703f495c5af0529
Reviewed-on: https://go-review.googlesource.com/2051Reviewed-by: default avatarKeith Randall <khr@golang.org>
(cherry picked from commit c6669e7a)
Reviewed-on: https://go-review.googlesource.com/2820Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 7df87f50
...@@ -150,10 +150,10 @@ func evacuated(b *bmap) bool { ...@@ -150,10 +150,10 @@ func evacuated(b *bmap) bool {
} }
func (b *bmap) overflow(t *maptype) *bmap { 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) { 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 { func makemap(t *maptype, hint int64) *hmap {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment