diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-03 17:54:50 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-08-03 17:54:50 +0000 |
commit | 7dcad7644af8b659eb769589c4cfc583e34a47ef (patch) | |
tree | 9571b922399290511f15ae0d488782d6fc9ee6fc /libgo/runtime | |
parent | eedb21850f619caf58c6f1e4d2be4a06f972feb6 (diff) | |
download | gcc-7dcad7644af8b659eb769589c4cfc583e34a47ef.tar.gz |
PR go/67101
runtime: Remove call to __builtin_frame_address.
__builtin_frame_address was only supposed to use nonzero arguments
for debugging purposes. Calling it with nonzero arguments can have
unpredictable results and uses are now marked unsafe when
-Wframe-address is enabled.
Reviewed-on: https://go-review.googlesource.com/13063
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226525 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/mprof.goc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libgo/runtime/mprof.goc b/libgo/runtime/mprof.goc index d9c220bca23..c9022df3dfb 100644 --- a/libgo/runtime/mprof.goc +++ b/libgo/runtime/mprof.goc @@ -402,10 +402,9 @@ func ThreadCreateProfile(p Slice) (n int, ok bool) { } func Stack(b Slice, all bool) (n int) { - byte *pc, *sp; + byte *pc; bool enablegc; - sp = runtime_getcallersp(&b); pc = (byte*)(uintptr)runtime_getcallerpc(&b); if(all) { @@ -423,7 +422,6 @@ func Stack(b Slice, all bool) (n int) { g->writebuf = (byte*)b.__values; g->writenbuf = b.__count; USED(pc); - USED(sp); runtime_goroutineheader(g); runtime_traceback(); runtime_printcreatedby(g); |