runtime: stack allocate Panic structure during runtime.panic
runtime: stack allocate Panic structure during runtime.panic

Update issue 7347

When runtime.panic is called the *Panic is malloced from the heap. This can lead to a gc cycle while panicing which can make a bad situation worse.

It appears to be possible to stack allocate the Panic and avoid malloc'ing during a panic.

Ref: https://groups.google.com/d/topic/golang-dev/OfxqpklGkh0/discussion

LGTM=minux.ma, dvyukov, rsc
R=r, minux.ma, gobot, rsc, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/66830043

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,webfd/go-zh,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,bryanxu/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,bryanxu/go-zh,sanjosh/sanjos100-tipc,bryanxu/go-zh,webfd/go-zh,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh,rdp/rogerpack2005-golang,webfd/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,bryanxu/go-zh,d0f/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,bryanxu/go-zh,rdp/rogerpack2005-golang,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,d0f/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh,bryanxu/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang,glycerine/jeaten-go-arrayof-structof,d0f/go-zh,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang