diff --git a/src/runtime/hashmap.go b/src/runtime/hashmap.go index d9e5d96207..87d0d26cfa 100644 --- a/src/runtime/hashmap.go +++ b/src/runtime/hashmap.go @@ -542,7 +542,7 @@ func mapassign(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer { h.flags |= hashWriting if h.buckets == nil { - h.buckets = newarray(t.bucket, 1) + h.buckets = newobject(t.bucket) // newarray(t.bucket, 1) } again: diff --git a/src/runtime/hashmap_fast.go b/src/runtime/hashmap_fast.go index 18ceee46d8..e7a719d63f 100644 --- a/src/runtime/hashmap_fast.go +++ b/src/runtime/hashmap_fast.go @@ -426,7 +426,7 @@ func mapassign_fast32(t *maptype, h *hmap, key uint32) unsafe.Pointer { h.flags |= hashWriting if h.buckets == nil { - h.buckets = newarray(t.bucket, 1) + h.buckets = newobject(t.bucket) // newarray(t.bucket, 1) } again: @@ -514,7 +514,7 @@ func mapassign_fast64(t *maptype, h *hmap, key uint64) unsafe.Pointer { h.flags |= hashWriting if h.buckets == nil { - h.buckets = newarray(t.bucket, 1) + h.buckets = newobject(t.bucket) // newarray(t.bucket, 1) } again: @@ -603,7 +603,7 @@ func mapassign_faststr(t *maptype, h *hmap, ky string) unsafe.Pointer { h.flags |= hashWriting if h.buckets == nil { - h.buckets = newarray(t.bucket, 1) + h.buckets = newobject(t.bucket) // newarray(t.bucket, 1) } again: