1
0
mirror of https://github.com/golang/go synced 2024-11-19 16:24:45 -07:00
go/src/runtime/cgo
Bryan C. Mills e0545faf27 runtime/cgo: defeat inlining in x_cgo_yield
We use a call to strncpy to work around a TSAN bug (wherein TSAN only
delivers asynchronous signals when the thread receiving the signal
calls a libc function). Unfortunately, GCC 7 inlines the call,
avoiding the TSAN libc trap entirely.

Per Ian's suggestion, use global variables as strncpy arguments: that
way, the compiler can't make any assumptions about the concrete values
and can't inline the call away.

fixes #21196

Change-Id: Ie95f1feaf9af1a8056f924f49c29cfc8515385d7
Reviewed-on: https://go-review.googlesource.com/55872
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-16 18:49:38 +00:00
..
asm_386.s
asm_amd64.s
asm_arm64.s
asm_arm.s
asm_mips64x.s
asm_mipsx.s
asm_nacl_amd64p32.s
asm_ppc64x.s runtime: save and restore CR for ppc64le 2017-06-05 19:59:49 +00:00
asm_s390x.s
callbacks_traceback.go
callbacks.go
cgo.go
dragonfly.go
freebsd.go
gcc_386.S
gcc_amd64.S
gcc_android_386.c runtime/cgo: make code robust 2017-08-11 18:51:24 +00:00
gcc_android_amd64.c runtime/cgo: make code robust 2017-08-11 18:51:24 +00:00
gcc_android_arm64.c
gcc_android_arm.c
gcc_android.c
gcc_arm64.S
gcc_arm.S
gcc_context.c
gcc_darwin_386.c runtime/cgo: make code robust 2017-08-11 18:51:24 +00:00
gcc_darwin_amd64.c runtime/cgo: make code robust 2017-08-11 18:51:24 +00:00
gcc_darwin_arm64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_darwin_arm.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_dragonfly_amd64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_fatalf.c
gcc_freebsd_386.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_freebsd_amd64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_freebsd_arm.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_libinit_windows.c
gcc_libinit.c
gcc_linux_386.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_amd64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_arm64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_arm.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_mips64x.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_mipsx.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_ppc64x.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_linux_s390x.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_mips64x.S
gcc_mipsx.S
gcc_mmap.c runtime: intercept munmap as we do mmap 2017-06-06 23:26:55 +00:00
gcc_netbsd_386.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_netbsd_amd64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_netbsd_arm.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_openbsd_386.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_openbsd_amd64.c runtime/cgo: fix typos 2017-06-21 15:54:38 +00:00
gcc_ppc64x.S
gcc_s390x.S
gcc_setenv.c
gcc_sigaction.c runtime/cgo: add TSAN annotations for C sigaction call 2017-05-26 16:34:43 +00:00
gcc_signal_darwin_armx.c
gcc_signal_darwin_lldb.c
gcc_solaris_amd64.c
gcc_traceback.c
gcc_util.c runtime/cgo: defeat inlining in x_cgo_yield 2017-08-16 18:49:38 +00:00
gcc_windows_386.c
gcc_windows_amd64.c
iscgo.go
libcgo_unix.h
libcgo.h cmd/cgo, runtime/cgo: add docs for TSAN interaction 2017-05-26 05:22:39 +00:00
mmap.go runtime: intercept munmap as we do mmap 2017-06-06 23:26:55 +00:00
netbsd.go
openbsd.go
setenv.go
sigaction.go
signal_darwin_arm64.s
signal_darwin_arm.s
signal_darwin_armx.go