]> Cypherpunks repositories - gostls13.git/commit
runtime: make TestGcSys actually test something
authorIan Lance Taylor <iant@golang.org>
Sat, 7 Jul 2018 05:57:35 +0000 (22:57 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 22 Aug 2018 19:47:55 +0000 (19:47 +0000)
commit0a519401651f46a098c5c295943cc1c48e53a48c
tree10854ca144bc9fc7af1eb6769f7740b273eb5ca4
parent68527ff4fb32c98b1f15367c65c526c2b2b3a57a
runtime: make TestGcSys actually test something

The workthegc function was being inlined, and the slice did not
escape, so there was no memory allocation. Use a sink variable to
force memory allocation, at least for now.

Fixes #23343

Change-Id: I02f4618e343c8b6cb552cb4e9f272e112785f7cf
Reviewed-on: https://go-review.googlesource.com/122576
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/testdata/testprog/gc.go