aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/hashmap.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-07-31 08:35:43 -0400
committerRuss Cox <rsc@golang.org>2013-07-31 08:35:43 -0400
commite8018fbebe2e6e86f94111b21c5749ebeea15dbd (patch)
tree1f0c9cb335ed428fea41526fe49fc136851c4458 /src/pkg/runtime/hashmap.c
parent27032fddee27dd3b02437b118e50c66586052830 (diff)
downloadgo-e8018fbebe2e6e86f94111b21c5749ebeea15dbd.tar.xz
runtime: rewrite map size test
I don't know why the memstats code is flaky. TBR=bradfitz CC=golang-dev https://golang.org/cl/12160043
Diffstat (limited to 'src/pkg/runtime/hashmap.c')
-rw-r--r--src/pkg/runtime/hashmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/runtime/hashmap.c b/src/pkg/runtime/hashmap.c
index 7e0c9572dd..4b51436dc2 100644
--- a/src/pkg/runtime/hashmap.c
+++ b/src/pkg/runtime/hashmap.c
@@ -1112,6 +1112,9 @@ runtimeĀ·makemap_c(MapType *typ, int64 hint)
Type *key;
key = typ->key;
+
+ if(sizeof(Hmap) > 48)
+ runtimeĀ·panicstring("hmap too large");
if(hint < 0 || (int32)hint != hint)
runtimeĀ·panicstring("makemap: size out of range");