[Bug go/92567] libgo regression in syscall test on ppc64le resulting in timeout due to hang in read

murphyp at linux dot vnet.ibm.com gcc-bugzilla@gcc.gnu.org
Mon Sep 14 14:04:58 GMT 2020


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

Paul E. Murphy <murphyp at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |murphyp at linux dot vnet.ibm.com

--- Comment #1 from Paul E. Murphy <murphyp at linux dot vnet.ibm.com> ---
So, this turns out to be an ABI violation of how ptrace() is called, and maybe
a documentation bug.  ptrace is actually implemented as a variadic function in
glibc which takes exactly 4 arguments, and this is not clear from the
documentation.

The golang code does not seem to allocate the parameter save space required
(2.2.2.3 of the ppc64 elfv2-1.4), and the space where golang saves the link
register gets stomped, and the forked process faults waiting for the tracer.

Newer versions of GCC seem to compile ptrace without needing to spill into the
parameter save space, so in many cases this issue is invisible.


More information about the Gcc-bugs mailing list