1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:50:05 -07:00
go/include
Russ Cox c2dd33a46f cmd/ld: clear unused ctxt before morestack
For non-closure functions, the context register is uninitialized
on entry and will not be used, but morestack saves it and then the
garbage collector treats it as live. This can be a source of memory
leaks if the context register points at otherwise dead memory.
Avoid this by introducing a parallel set of morestack functions
that clear the context register, and use those for the non-closure functions.

I hope this will help with some of the finalizer flakiness, but it probably won't.

Fixes #7244.

LGTM=dvyukov
R=khr, dvyukov
CC=golang-codereviews
https://golang.org/cl/71030044
2014-03-04 13:53:08 -05:00
..
plan9 lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
ar.h gopack: change archive file name length back to 16 2011-11-01 00:29:16 -04:00
bio.h build: do not use the host's libbio on Plan 9 2013-12-09 18:39:58 -05:00
bootexec.h
fmt.h
libc.h cmd/dist, cmd/ld: GO_EXTLINK_ENABLED=0 defaults to -linkmode=internal 2013-03-29 16:33:35 -07:00
link.h cmd/ld: clear unused ctxt before morestack 2014-03-04 13:53:08 -05:00
mach.h libmach: support reading symbols from Windows .exe for nm 2011-08-29 14:25:43 -04:00
README include: add a README file 2013-05-22 18:51:15 +08:00
u.h liblink: create new library based on linker code 2013-12-08 22:49:37 -05:00
ureg_amd64.h libmach: use different names for different Ureg types 2014-01-08 20:37:27 -05:00
ureg_arm.h libmach: use different names for different Ureg types 2014-01-08 20:37:27 -05:00
ureg_x86.h libmach: use different names for different Ureg types 2014-01-08 20:37:27 -05:00
utf.h

The header files under this directory are strictly internal to the gc
toolchain, so please don't copy them to the system include file
directory (/usr/include, /usr/local/include, etc.)

Also note that they must be kept as is in $GOROOT/include, or cmd/dist
will malfunction.