]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: add GOEXPERIMENT=zerostack to clear stack on function entry
authorRuss Cox <rsc@golang.org>
Mon, 17 Dec 2012 19:32:26 +0000 (14:32 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 17 Dec 2012 19:32:26 +0000 (14:32 -0500)
commitb7603cfc2cf8ffa261aca63dd59fb1e7d58180ff
tree44e88201a9d8d4b4b2b1834fe7dd605e50079b96
parent5a2c275be125d935440ddad3042bfc7bb2ce5027
cmd/gc: add GOEXPERIMENT=zerostack to clear stack on function entry

This is expensive but it might be useful in cases where
people are suffering from false positives during garbage
collection and are willing to trade the CPU time for getting
rid of the false positives.

On the other hand it only eliminates false positives caused
by other function calls, not false positives caused by dead
temporaries stored in the current function call.

The 5g/6g/8g changes were pulled out of the history, from
the last time we needed to do this (to work around a goto bug).
The code in go.h, lex.c, pgen.c is new but tiny.

R=ken2
CC=golang-dev
https://golang.org/cl/6938073
src/cmd/5g/gsubr.c
src/cmd/6g/gsubr.c
src/cmd/8g/gsubr.c
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/pgen.c