re PR go/67101 (mprof.goc:408:5: error: calling ‘__builtin_frame_address’ with a...
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 3 Aug 2015 17:54:50 +0000 (17:54 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 3 Aug 2015 17:54:50 +0000 (17:54 +0000)
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

gcc/go/gofrontend/MERGE
libgo/runtime/mprof.goc

index 4ebc803a9152778c1c23bfca1880cefd521d761f..2632f4e67241a896aa04fc28d3ea9040d1515a86 100644 (file)
@@ -1,4 +1,4 @@
-2bf7c643a1d2f8503070c8e6cb87852026e32400
+d5aad2f400a0f21724e33e4ae48e1583ed8b1a87
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index d9c220bca23fcefcae33d73171bb7bc5ae777979..c9022df3dfbbb979eca556391387d22efa5365ce 100644 (file)
@@ -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);