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.
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.