[Bug go/64999] s390x libgo test failure in TestMemoryProfiler

ian at airs dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 12 19:07:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64999

--- Comment #54 from Ian Lance Taylor <ian at airs dot com> ---
I assume that it works on x86 because subtracting 1 from PC in libbacktrace,
and then subtracting 1 again in runtime/pprof/pprof.go, still gives you a PC
within the call instruction.  On PPC, subtracting 1 in libbacktrace and then
subtracting 4 in pprof.go gives you a PC in the instruction just before the
call instruction.

I appreciate that you only want to fix what is broken, but in this case I think
we should turn that around and keep the code simple unless we find that it
breaks something.

Yes, you're right that if we were to change libbacktrace it would mean passing
the flag through a chain of functions.  Basically the flag would have to move
along with the PC value.  I'm not sure this is worth doing, ip_before_insn is
always false except when tracing back through a signal trampoline, where the
file/line information is generally not helpful anyhow.



More information about the Gcc-bugs mailing list