]> Cypherpunks repositories - gostls13.git/commit
runtime: don't panic for bad size hint in hashmap
authorFilip Gruszczynski <gruszczy@gmail.com>
Sat, 15 Apr 2017 22:17:29 +0000 (15:17 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 2 May 2017 20:51:39 +0000 (20:51 +0000)
commitf9531448b8abf7bb3c2702761bd8792a3bef33a0
tree6476b596aca0c943b1f6fd2456f48c6b5a81fc0b
parent9f6fde3a23c7d40eb625ad3a58a6b1ad4e33265a
runtime: don't panic for bad size hint in hashmap

Because the hint parameter is supposed to be treated
purely as a hint, if it doesn't meet the requirements
we disregard it and continue as if there was no hint
at all.

Fixes #19926

Change-Id: I86e7f99472fad6b99ba4e2fd33e4a9e55d55115e
Reviewed-on: https://go-review.googlesource.com/40854
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/hashmap.go
src/runtime/map_test.go
test/fixedbugs/bug273.go