diff options
author | Dmitri Shuralyov <dmitshur@google.com> | 2022-04-13 15:33:25 +0000 |
---|---|---|
committer | Dmitri Shuralyov <dmitshur@google.com> | 2022-04-13 15:33:25 +0000 |
commit | ed86dfc4e441ee7597586dd858fb87c987f1f3c8 (patch) | |
tree | 5a8bc12cf9f7ca932a82e4f8564b18ed928a93e9 /src/runtime/mfinal_test.go | |
parent | 4ea866a9969f4ff2ffd975116a17bbe01ce00469 (diff) | |
parent | 346b18ee9d15410ab08dd583787c64dbed0666d2 (diff) | |
download | go-ed86dfc4e441ee7597586dd858fb87c987f1f3c8.tar.gz go-ed86dfc4e441ee7597586dd858fb87c987f1f3c8.zip |
[dev.boringcrypto.go1.17] all: merge go1.17.9 into dev.boringcrypto.go1.17
Change-Id: I65c66a480c706b9bf453e7df68afdb7fc163f58b
Diffstat (limited to 'src/runtime/mfinal_test.go')
-rw-r--r-- | src/runtime/mfinal_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/mfinal_test.go b/src/runtime/mfinal_test.go index 3ca8d31c60..8827d55af1 100644 --- a/src/runtime/mfinal_test.go +++ b/src/runtime/mfinal_test.go @@ -42,6 +42,15 @@ func TestFinalizerType(t *testing.T) { {func(x *int) interface{} { return Tintptr(x) }, func(v *int) { finalize(v) }}, {func(x *int) interface{} { return (*Tint)(x) }, func(v *Tint) { finalize((*int)(v)) }}, {func(x *int) interface{} { return (*Tint)(x) }, func(v Tinter) { finalize((*int)(v.(*Tint))) }}, + // Test case for argument spill slot. + // If the spill slot was not counted for the frame size, it will (incorrectly) choose + // call32 as the result has (exactly) 32 bytes. When the argument actually spills, + // it clobbers the caller's frame (likely the return PC). + {func(x *int) interface{} { return x }, func(v interface{}) [4]int64 { + print() // force spill + finalize(v.(*int)) + return [4]int64{} + }}, } for i, tt := range finalizerTests { |