diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go index 33bd75fda50..c616b37008b 100644 --- a/src/reflect/all_test.go +++ b/src/reflect/all_test.go @@ -1693,9 +1693,9 @@ func TestCallReturnsEmpty(t *testing.T) { // nonzero-sized frame and zero-sized return value. runtime.GC() var finalized uint32 - f := func() (emptyStruct, *int) { - i := new(int) - runtime.SetFinalizer(i, func(*int) { atomic.StoreUint32(&finalized, 1) }) + f := func() (emptyStruct, *[2]int64) { + i := new([2]int64) // big enough to not be tinyalloc'd, so finalizer always runs when i dies + runtime.SetFinalizer(i, func(*[2]int64) { atomic.StoreUint32(&finalized, 1) }) return emptyStruct{}, i } v := ValueOf(f).Call(nil)[0] // out[0] should not alias out[1]'s memory, so the finalizer should run.