golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.81k stars 17.64k forks source link

runtime: GC precision tests #6097

Closed dvyukov closed 7 years ago

dvyukov commented 11 years ago
Since we are actively working on precise GC with the goal of 100% precision. It's a good
idea to have some GC precision tests. E.g. allocate a heap block, set finalizer for it,
cast the pointer to uintptr, spray the value to locals/arguments/globals/heap/etc, call
GC, ensure that the block is still collected. Later when we discover/fix new corner
cases, we will be able to test them as well.
dvyukov commented 11 years ago

Comment 1:

While I remember, one place where we are conservative is arguments/locals of assembly
functions.
lexprfuncall commented 11 years ago

Comment 2:

This is a good idea.  I have tests like the one you describe for use with the liveness
analysis that I will incorporate in the test suite when that is checked in.  I also have
a debugging mode that aggressively verifies the correctness of the maps on ordinary code.
rsc commented 11 years ago

Comment 3:

No longer for Go 1.2, because precision didn't make it in.

Labels changed: removed go1.2maybe.

rsc commented 10 years ago

Comment 4:

Labels changed: added go1.3maybe.

rsc commented 10 years ago

Comment 5:

Labels changed: added release-none, removed go1.3maybe.

rsc commented 10 years ago

Comment 6:

Labels changed: added repo-main.

rsc commented 10 years ago

Comment 7:

Owner changed to @rsc.

dvyukov commented 7 years ago

obsolete