go/src/reflect
Keith Randall 6609baf2f7 [release-branch.go1.4] runtime: hashmap: move overflow pointer to end of bucket
Pointers to zero-sized values may end up pointing to the next
object in memory, and possibly off the end of a span.  This
can cause memory leaks and/or confuse the garbage collector.

By putting the overflow pointer at the end of the bucket, we
make sure that pointers to any zero-sized keys or values don't
accidentally point to the next object in memory.

fixes #9384

Change-Id: I5d434df176984cb0210b4d0195dd106d6eb28f73
Reviewed-on: https://go-review.googlesource.com/1869
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit fbc56cf050)
Reviewed-on: https://go-review.googlesource.com/2801
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-14 05:42:05 +00:00
..
all_test.go [release-branch.go1.4] reflect: Fix reflect.funcLayout. The GC bitmap has two bits per 2014-12-01 11:18:47 -05:00
asm_386.s runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback 2014-09-12 07:29:19 -04:00
asm_amd64.s runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback 2014-09-12 07:29:19 -04:00
asm_amd64p32.s runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback 2014-09-12 07:29:19 -04:00
asm_arm.s runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback 2014-09-12 07:29:19 -04:00
deepequal.go build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
example_test.go build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
export_test.go [release-branch.go1.4] reflect: Fix reflect.funcLayout. The GC bitmap has two bits per 2014-12-01 11:18:47 -05:00
makefunc.go reflect: a few microoptimizations 2014-10-17 12:54:31 -04:00
set_test.go build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
tostring_test.go build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
type.go [release-branch.go1.4] runtime: hashmap: move overflow pointer to end of bucket 2015-01-14 05:42:05 +00:00
value.go reflect: allocate correct type in assignTo and cvtT2I 2014-10-20 10:43:43 -07:00