From 612d78d681dbaf1b561559d81a0922579664e370 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 12 Feb 2015 22:31:27 +0300 Subject: [PATCH] cmd/gc: restore amd64p32 hack for bucket size This was accidentially removed in: https://go-review.googlesource.com/#/c/3508/8/src/cmd/gc/reflect.c Change-Id: I06dd5bb0cb3e2811bd4ef605d7a5225cfa033fe0 Reviewed-on: https://go-review.googlesource.com/4731 Reviewed-by: Keith Randall --- src/cmd/gc/reflect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cmd/gc/reflect.c b/src/cmd/gc/reflect.c index 852485d13e..7f81e676f9 100644 --- a/src/cmd/gc/reflect.c +++ b/src/cmd/gc/reflect.c @@ -173,6 +173,11 @@ mapbucket(Type *t) field[nelem(field)-1]->down = T; dowidth(bucket); + // Pad to the native integer alignment. + // This is usually the same as widthptr; the exception (as usual) is amd64p32. + if(widthreg > widthptr) + bucket->width += widthreg - widthptr; + // See comment on hmap.overflow in ../../runtime/hashmap.go. if(!haspointers(t->type) && !haspointers(t->down)) bucket->haspointers = 1; // no pointers -- 2.50.0