diff options
| author | Russ Cox <rsc@golang.org> | 2013-07-31 08:35:43 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2013-07-31 08:35:43 -0400 |
| commit | e8018fbebe2e6e86f94111b21c5749ebeea15dbd (patch) | |
| tree | 1f0c9cb335ed428fea41526fe49fc136851c4458 /src/pkg/runtime/hashmap.c | |
| parent | 27032fddee27dd3b02437b118e50c66586052830 (diff) | |
| download | go-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.c | 3 |
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"); |
