libgo: prune sighandler frames in runtime.sigprof

When writing stack frames to the pprof CPU profile machinery, it is
very important to insure that the frames emitted do not contain any
frames corresponding to artifacts of the profiling process itself
(signal handlers, sigprof, etc). This patch changes runtime.sigprof to
strip out those frames from the raw stack generated by
"runtime.callers".

Fixes golang/go#26595.

Change-Id: I6045e3e6a01421b0d38358ee885336735b49a780
Reviewed-on: https://go-review.googlesource.com/126175
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2 files changed