[Bug go/65180] regression in gccgo testcase runtime/pprof on ppc64le, ppc64 following move to go 1.4 from 1.3
boger at us dot ibm.com
gcc-bugzilla@gcc.gnu.org
Fri Apr 17 15:46:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65180
--- Comment #2 from boger at us dot ibm.com ---
We've been putting most of the discussion on this in the bugzilla mentioned in
the previous comment.
However there is a simple fix for Power which I will add here:
ndex: libgo/runtime/go-callers.c
===================================================================
--- libgo/runtime/go-callers.c (revision 222128)
+++ libgo/runtime/go-callers.c (working copy)
@@ -83,8 +83,20 @@ callback (void *data, uintptr_t pc, const char *fi
}
loc = &arg->locbuf[arg->index];
- loc->pc = pc;
+ /* On the call to backtrace_full the pc value was most likely decremented
+ if there was a normal call, since the pc referred to the instruction
+ where the call returned and not the call itself. This was done so that
+ the line number referred to the call instruction. To make sure
+ the actual pc from the call stack is used, it is incremented here.
+
+ In the case of a signal, the pc was not decremented by backtrace_full but
+ still incremented here. That doesn't really hurt anything since the line
+ number is right and the pc refers to the same instruction.
+ */
+
+ loc->pc = pc+1;
+
/* The libbacktrace library says that these strings might disappear,
but with the current implementation they won't. We can't easily
allocate memory here, so for now assume that we can save a
Since 64999 was written against Z there might be an additional change needed to
make that work.
More information about the Gcc-bugs
mailing list