1
0
mirror of https://github.com/golang/go synced 2024-10-02 18:08:33 -06:00

cmd/gc, runtime: correct a misnomer regarding dead value maps

The funcdata symbol incorrectly named the dead value map the
dead pointer map.  The dead value map identifies all dead
values, including pointers and non-pointers, in a stack frame.
The purpose of this map is to allow the runtime to poison
locations of dead data to catch lost invariants.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/38670043
This commit is contained in:
Carl Shapiro 2013-12-09 14:45:10 -08:00
parent 9a53fb571d
commit bc9691c465
3 changed files with 5 additions and 3 deletions

View File

@ -159,7 +159,7 @@ compile(Node *fn)
// compile time. At present, the amount of additional RSS is
// substantial enough to affect our smallest build machines.
if(0)
gcdead = makefuncdatasym("gcdead·%d", FUNCDATA_DeadPointerMaps);
gcdead = makefuncdatasym("gcdead·%d", FUNCDATA_DeadValueMaps);
else
gcdead = nil;

View File

@ -1477,9 +1477,11 @@ liveness(Node *fn, Prog *firstp, Sym *argssym, Sym *livesym, Sym *deadsym)
if(0) livenessprintcfg(lv);
livenessepilogue(lv);
// Emit the map data structures
// Emit the live pointer map data structures
twobitwritesymbol(lv->livepointers, livesym, nil);
twobitwritesymbol(lv->argslivepointers, argssym, nil);
// Optionally emit a dead value map data structure for locals.
if(deadsym != nil)
twobitwritesymbol(lv->deadvalues, deadsym, nil);

View File

@ -12,7 +12,7 @@
#define FUNCDATA_ArgsPointerMaps 2 /* garbage collector blocks */
#define FUNCDATA_LocalsPointerMaps 3
#define FUNCDATA_DeadPointerMaps 4
#define FUNCDATA_DeadValueMaps 4
// To be used in assembly.
#define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n