runtime: TestGcSys does not really pass, should be fixed or removed #23343
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The runtime test
TestGcSys
no longer tests anything. The test simply checks whether the functionGCSys
in runtime/testdata/testprog/gc.go printsOK
. It currently passes because the helper functionworkthegc
is inlined and the compiler discards the allocation of the slice. If I change the code slightly to add//go:noinline
beforeworkthegc
, the test fails, sayingusing too much memory: 64086016 bytes
(the exact number of bytes reported varies).We should either discard the test or fix it so that it actually tests something about the GC.
(I noticed this because the test fails consistently using gccgo, which does not currently discard the slice allocation.)
CC @aclements @RLH
The text was updated successfully, but these errors were encountered: