1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:50:21 -07:00
go/src/reflect
Keith Randall 78ce3a0368 reflect: use a bigger object when we need a finalizer to run
If an object is allocated as part of a tinyalloc, then other live
objects in the same tinyalloc chunk keep the finalizer from being run,
even if the object that has the finalizer is dead.

Make sure the object we're setting the finalizer on is big enough
to not trigger tinyalloc allocation.

Fixes #26857
Update #21717

Change-Id: I56ad8679426283237ebff20a0da6c9cf64eb1c27
Reviewed-on: https://go-review.googlesource.com/128475
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2018-08-24 22:17:54 +00:00
..
all_test.go reflect: use a bigger object when we need a finalizer to run 2018-08-24 22:17:54 +00:00
asm_386.s
asm_amd64.s
asm_amd64p32.s
asm_arm64.s
asm_arm.s
asm_mips64x.s
asm_mipsx.s
asm_ppc64x.s
asm_s390x.s
asm_wasm.s runtime: add js/wasm architecture 2018-05-08 00:17:34 +00:00
deepequal.go reflect: reuse values during comparison of maps in DeepEqual 2018-05-31 15:18:53 +00:00
example_test.go
export_test.go reflect: audit and explain safety of all unsafe.Pointer additions 2017-12-01 21:05:40 +00:00
makefunc.go
set_test.go reflect: define MyBuffer more locally in TestImplicitMapConversion 2018-04-18 12:47:39 +00:00
swapper.go reflect: audit and explain safety of all unsafe.Pointer additions 2017-12-01 21:05:40 +00:00
tostring_test.go
type.go reflect: remove struct tags from unexported types 2018-06-28 23:06:00 +00:00
value.go reflect: add Value.MapRange method and MapIter type 2018-08-22 20:16:01 +00:00