]> Cypherpunks repositories - gostls13.git/commit
runtime,runtime/cgo: fix tsan/pprof/cgo issues
authorPaul E. Murphy <murp@ibm.com>
Fri, 10 Mar 2023 22:05:47 +0000 (16:05 -0600)
committerPaul Murphy <murp@ibm.com>
Tue, 14 Mar 2023 16:42:25 +0000 (16:42 +0000)
commit46bc9a6e1e94d0c7929a4835a3d163b721085329
tree5e03410c5957c5a84cf9a2505a100dde6f42b318
parent035db07d7c5f1b90ebc9bae03cab694685acebb8
runtime,runtime/cgo: fix tsan/pprof/cgo issues

The tsan13 test highlighted a few bugs.

The first being runtime.sigprofNonGoWrapper was being
called from C code and violating the C ABI.

The second was a missed tsan acquire/release after
thread creation.

The third was runtime.cgoSigtramp violating ELFv2
ABI constraints when loading g. It is reworked to
avoid clobbering R30 and R31 via runtime.load_g.

Change-Id: Ib2d98047fa1b4e72b8045767e86457a8ddfe492e
Reviewed-on: https://go-review.googlesource.com/c/go/+/475935
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Archana Ravindar <aravind5@in.ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/cgo/abi_ppc64x.h [new file with mode: 0644]
src/runtime/cgo/gcc_ppc64x.c
src/runtime/sys_linux_ppc64x.s