diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-08-03 17:54:50 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-08-03 17:54:50 +0000 |
commit | 3d6d2a63b2457450d93cfaa9787a27359264b2c3 (patch) | |
tree | 9571b922399290511f15ae0d488782d6fc9ee6fc /libgo | |
parent | 8a9212788db6800b478389b5db1b9807c58286e9 (diff) | |
download | gcc-3d6d2a63b2457450d93cfaa9787a27359264b2c3.zip gcc-3d6d2a63b2457450d93cfaa9787a27359264b2c3.tar.gz gcc-3d6d2a63b2457450d93cfaa9787a27359264b2c3.tar.bz2 |
re PR go/67101 (mprof.goc:408:5: error: calling ‘__builtin_frame_address’ with a nonzero argument is unsafe [-Werror=frame-address])
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
From-SVN: r226525
Diffstat (limited to 'libgo')
-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 d9c220b..c9022df 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); |