1
0
mirror of https://github.com/golang/go synced 2024-11-23 16:50:06 -07:00
go/src
Russ Cox 378c2515ae runtime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous
The assumption can be violated by external linkers reordering them or
inserting non-Go sections in between them. I looked briefly at trying
to write out the _go_.o in external linking mode in a way that forced
the ordering, but no matter what there's no way to force Go's data
and Go's bss to be next to each other. If there is any data or bss from
non-Go objects, it's very likely to get stuck in between them.

Instead, rewrite the two places we know about that make the assumption.
I grepped for noptrdata to look for more and didn't find any.

The added race test (os/exec in external linking mode) fails without
the changes in the runtime. It crashes with an invalid pointer dereference.

Fixes #9133.

LGTM=dneil
R=dneil
CC=dvyukov, golang-codereviews, iant
https://golang.org/cl/179980043
2014-11-19 15:25:33 -05:00
..
archive
bufio bufio: remove unused 'panicked' variable from test 2014-11-06 15:22:29 +11:00
builtin
bytes cmd/go: fix bytes and net the right way 2014-09-24 19:18:01 -04:00
cmd cmd/pprof: fix EOF handling when getting function source 2014-11-17 14:44:41 -05:00
compress all: use golang.org/x/... import paths 2014-11-10 09:15:57 +11:00
container
crypto crypto/x509: add Solaris certificate file location 2014-11-09 20:57:44 -08:00
database/sql database/sql: make TestDrivers not crash on second run 2014-10-31 09:49:42 -07:00
debug debug/goobj: move to cmd/internal/goobj 2014-11-16 20:52:45 -05:00
encoding encoding/json: encode \t as \t instead of \u0009 2014-10-27 18:58:25 -04:00
errors
expvar
flag flag: roll back 156390043 (flag setting) 2014-10-20 13:28:00 -07:00
fmt fmt: fix one-letter typo in doc.go 2014-10-29 06:53:05 -07:00
go go/build: Return MultiplePackageError on importing a dir containing multiple packages 2014-10-14 23:24:58 -04:00
hash hash/crc32: fix comment that the IEEE polynomial applies to MPEG-2. 2014-11-12 18:48:00 +11:00
html html/template: fix build after encoding/js escaping change 2014-10-28 10:18:44 +11:00
image image/gif: don't let the per-frame transparent index modify the global 2014-09-22 14:29:45 +10:00
index/suffixarray
internal/syscall
io
lib9
libbio
liblink liblink: require DATA lines to be ordered by offset, with no overlap 2014-10-14 23:25:12 -04:00
log log/syslog: try /var/run/log, for FreeBSD 2014-09-30 12:30:16 -04:00
math math/big: Allow non-prime modulus for ModInverse 2014-10-14 14:09:56 -07:00
mime
net net/http: add comment to clarify whether Dir is '/' or '\'. 2014-11-14 11:43:01 +11:00
os os: document that users of Fd should keep f alive 2014-11-06 09:36:51 -05:00
path path/filepath: document that Glob ignores i/o errors 2014-09-18 21:50:22 -04:00
reflect reflect: fix TestAllocations now that interfaces hold only pointers 2014-10-20 11:10:03 -07:00
regexp regexp/syntax: Clarify comment of OpAnyCharNotNL. 2014-11-11 18:52:07 -08:00
runtime runtime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous 2014-11-19 15:25:33 -05:00
sort
strconv
strings strings: use fast path for IndexRune 2014-10-06 15:10:51 -07:00
sync sync/atomic: fix comment referencing Value.Store's argument name 2014-10-31 00:48:57 -03:00
syscall undo CL 131750044 / 2d6d44ceb80e 2014-11-19 14:16:12 -05:00
testing runtime: fix memory profiler 2014-10-16 22:11:26 +04:00
text text/template: fix bug in pipelined variadics 2014-10-18 11:22:05 -07:00
time time: panic with a more helpful error on use of invalid Timer 2014-10-21 13:26:40 +02:00
unicode unicode/utf8: fix docs for DecodeRune(empty) and friends. 2014-10-16 09:13:50 +11:00
unsafe unsafe: document that unsafe programs are not protected 2014-10-24 09:37:25 -07:00
all.bash
all.bat
all.rc
androidtest.bash
clean.bash
clean.bat
clean.rc
make.bash
make.bat
Make.dist
make.rc
nacltest.bash
race.bash
race.bat
run.bash runtime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous 2014-11-19 15:25:33 -05:00
run.bat run.bat: comment text properly 2014-10-02 16:15:36 +10:00
run.rc
sudo.bash