This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/64999] s390x libgo test failure in TestMemoryProfiler
- From: "boger at us dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Mar 2015 14:13:39 +0000
- Subject: [Bug go/64999] s390x libgo test failure in TestMemoryProfiler
- Auto-submitted: auto-generated
- References: <bug-64999-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64999
--- Comment #51 from boger at us dot ibm.com ---
Here is the change I made to go-callers.c. This patch along with my previous
changes to extern.go and pprof.go allows the test identified in this issue to
report the correct line number on ppc64le. I wanted to post it here for
comments before I do the bootstrap build and test on ppc64 and ppc64le in case
there is a concern with using an #if defined. This is in libgo/runtime and I
didn't see any other examples where it used the GOARCH value in C code so that
is why I did it this way.
===================================================================
--- libgo/runtime/go-callers.c (revision 221039)
+++ libgo/runtime/go-callers.c (working copy)
@@ -83,6 +83,10 @@ callback (void *data, uintptr_t pc, const char *fi
}
loc = &arg->locbuf[arg->index];
+#if defined(__powerpc64__) || defined(__s390__) || defined(__s390x__)
+ if ((pc & 1) == 1)
+ pc++;
+#endif
loc->pc = pc;
/* The libbacktrace library says that these strings might disappear,