- 09 Mar, 2013 2 commits
-
-
Russ Cox authored
The sticking point on 386 has been the "PC relative" relocations used to point the garbage collection metadata at the type info. These aren't in the code segment, and I don't trust that the linker isn't doing something special that would be okay in code but not when interpreting the pointers as data (for example, a PLT jump table would be terrible). Solve the problem in two steps: 1. Handle "PC relative" relocations within a section internally, so that the external linker never sees them. 2. Move the gcdata and gcbss tables into the rodata section, where the type information lives, so that the relocations can be handled internally. (To answer the obvious question, we make the gc->type references relative so that they need not be relocated individually when generating a shared object file.) R=golang-dev, iant CC=golang-dev https://golang.org/cl/7629043
-
Rob Pike authored
For better printing, I recently changed Name to return "<unnamed>" for templates with empty names, but this causes trouble for the many packages that used "" as the template name, so restore the old behavior. It's usually printed as a quoted string anyway, so it should be fine. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7577044
-
- 08 Mar, 2013 11 commits
-
-
Rémy Oudompheng authored
Fixes #4981. R=bradfitz, fullung, rsc, minux.ma CC=golang-dev https://golang.org/cl/7474047
-
Rob Pike authored
The information was missing, oddly enough. R=golang-dev, rsc, iant CC=golang-dev https://golang.org/cl/7636044
-
Rob Pike authored
Also rename the relevant examples and make sure the working one compiles. R=golang-dev, bradfitz, adg, iant, rsc CC=golang-dev https://golang.org/cl/7597043
-
Brad Fitzpatrick authored
Fixes #4902 R=golang-dev, alex.brainman, r, google CC=golang-dev https://golang.org/cl/7579045
-
Russ Cox authored
Otherwise the next goroutine run on the m can get inadvertently locked if it executes a cgo call that turns on the internal lock. While we're here, fix the cgo panic unwind to decrement m->ncgo like the non-panic unwind does. Fixes #4971. R=golang-dev, iant, dvyukov CC=golang-dev https://golang.org/cl/7627043
-
Russ Cox authored
Have seen failures with GOMAXPROCS=4 on Windows. R=golang-dev, r CC=golang-dev https://golang.org/cl/7626043
-
Russ Cox authored
Before this CL, running cd misc/cgo/test go test -c readelf --dyn-syms test.test | grep cgoexp turned up many UNDEF symbols corresponding to symbols actually in the binary but marked only cgo_export_static. Only symbols marked cgo_export_dynamic should be listed in this mode. And if the symbol is going to be listed, it should be listed with its actual address instead of UNDEF. The Linux dynamic linker didn't care about the seemingly missing symbols, but the BSD one did. This CL eliminates the symbols from the dyn-syms table. R=golang-dev TBR=golang-dev CC=golang-dev https://golang.org/cl/7624043
-
Robert Griesemer authored
Fixes #4905. R=rsc, r, iant, ken CC=golang-dev https://golang.org/cl/7583043
-
Russ Cox authored
- Introduce MaxAlign constant and use in data layout and ELF section header. - Allow up to 16-byte alignment for large objects (will help Keith's hash changes). - Emit ELF symbol for .rathole (global /dev/null used by 8c). - Invoke gcc with -m32/-m64 as appropriate. - Don't invoke gcc if writing the .o file failed. R=golang-dev, iant CC=golang-dev https://golang.org/cl/7563045
-
Russ Cox authored
Now the default startup is that the program begins at _rt0_386_$GOOS, which behaves as if calling main(argc, argv). Main jumps to _rt0_386. This makes the _rt0_386 entry match the expected semantics for the standard C "main" function, which we can now provide for use when linking against a standard C library. 386 analogue of https://golang.org/cl/7525043 R=golang-dev, r CC=golang-dev https://golang.org/cl/7551045
-
Brad Fitzpatrick authored
Implement what Chrome calls socket "late binding". See: https://insouciant.org/tech/connection-management-in-chromium/ In a nutshell, if our HTTP client needs a TCP connection to a remote host and there's not an idle one available, rather than kick off a dial and wait for that specific dial, we instead kick off a dial and wait for either our own dial to finish, or any other TCP connection to that same host to become available. The implementation looks like a classic "Learning Go Concurrency" slide. Chrome's commit and numbers: http://src.chromium.org/viewvc/chrome?view=rev&revision=36230 R=golang-dev, daniel.morsing, adg CC=golang-dev https://golang.org/cl/7587043
-
- 07 Mar, 2013 19 commits
-
-
Akshat Kumar authored
Change 231af8ac63aa (CL 7314062) made runtime.enteryscall() set m->mcache = nil, which means that we can no longer use syscall.errstr in syscall.Syscall and syscall.Syscall6, since it requires a new buffer to be allocated for holding the error string. Instead, we use pre-allocated per-M storage to hold error strings from syscalls made while in entersyscall mode, and call runtime.findnull to calculate the lengths. Fixes #4994. R=rsc, rminnich, ality, dvyukov, rminnich, r CC=golang-dev https://golang.org/cl/7567043
-
Mikio Hara authored
This CL splits multicast listener tests into two; for IPv4 and for IPv6. It also removes redundant test inputs and makes sure that assignment of multicast interface to stablize the tests. Fixes #4059. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7565043
-
Keith Randall authored
Instructions for use in AES hashing. See CL#7543043 R=rsc CC=golang-dev https://golang.org/cl/7548043
-
Rémy Oudompheng authored
The code would violate the contract of cmp64. Fixes #5002. R=rsc, golang-dev CC=golang-dev https://golang.org/cl/7593043
-
Brad Fitzpatrick authored
R=golang-dev, iant CC=golang-dev https://golang.org/cl/7595043
-
Russ Cox authored
TBR=golang-dev CC=golang-dev https://golang.org/cl/7575046
-
Robert Griesemer authored
R=adonovan, bradfitz CC=golang-dev https://golang.org/cl/7492045
-
Dominik Honnef authored
Instead of relying on gofmt's diff output (which is a unified diff), we manually invoke diff -n and produce an RCS format diff, which can easily be parsed in Emacs, with the go--apply-rcs-patch function. This fixes undocumented issues with the old implementation such as skipping over hunks of changes, and it fixes the documented issue of not being able to handle file names that include whitespace. It can also apply the patch on a buffer that has no file name attached at all. Last but not least, it greatly simplifies the gofmt function itself. Fixes #4766. Fixes #4475. R=adonovan, cw, patrick.allen.higgins, sameer CC=golang-dev https://golang.org/cl/7516046
-
Dmitriy Vyukov authored
Move pollServer from fd_unix.go to fd_poll_unix.go. Add pollServerInit(*NetFD) to allow custom initialization. Add pollServer.Close(*NetFD) to allow custom finalization. Move setDeadline() to fd_poll_unix.go to allow custom handling of deadlines. Move newPollServer() to fd_poll_unix.go to allow custom initialization. No logical code changes. The next step will be to turn off fd_poll_unix.go for some platform (I have changes for darwin/linux) and redirect it into runtime. See: https://golang.org/cl/7569043/diff/2001/src/pkg/net/fd_poll_runtime.go R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7513045
-
Dmitriy Vyukov authored
The deadlock episodically occurs on misc/cgo/test/TestCthread. The problem is that starttheworld() leaves some P's with local work without M's. Then all active M's enter into syscalls, but reject to wake another M's due to the following check (both in entersyscallblock() and in retake()): if(p->runqhead == p->runqtail && runtime·atomicload(&runtime·sched.nmspinning) + runtime·atomicload(&runtime·sched.npidle) > 0) continue; R=rsc CC=golang-dev https://golang.org/cl/7424054
-
Russ Cox authored
Still to do: non-linux and non-amd64. It may work on other ELF-based amd64 systems too, but untested. "go test -ldflags -hostobj $GOROOT/misc/cgo/test" passes. Much may yet change, but this seems a reasonable checkpoint. R=iant CC=golang-dev https://golang.org/cl/7369057
-
Russ Cox authored
Fixes #4955. R=golang-dev, alex.brainman CC=golang-dev https://golang.org/cl/7563043
-
Dmitriy Vyukov authored
Ensure that accept/connect respect deadline, even if the operation can be executed w/o blocking. Note this changes external behavior, but it makes it consistent with read/write. Factor out deadline check into pollServer.PrepareRead/Write, in preparation for edge triggered pollServer. Ensure that pollServer.WaitRead/Write are not called concurrently by adding rio/wio locks around connect/accept. R=golang-dev, mikioh.mikioh, bradfitz, iant CC=golang-dev https://golang.org/cl/7436048
-
Mikio Hara authored
R=golang-dev, akumar CC=golang-dev https://golang.org/cl/7523044
-
Mikio Hara authored
R=golang-dev, akumar CC=golang-dev https://golang.org/cl/7564043
-
Tyler Bunnell authored
Fixes #4505. R=golang-dev, mikioh.mikioh CC=golang-dev https://golang.org/cl/7468043
-
Rob Pike authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7551043
-
Robert Griesemer authored
Fixes #4982. R=adonovan, r CC=golang-dev https://golang.org/cl/7537043
-
Robert Griesemer authored
Also: - cleaner handling of constants w/ unknown value - removed several TODOs R=adonovan CC=golang-dev https://golang.org/cl/7473043
-
- 06 Mar, 2013 8 commits
-
-
Albert Strasheim authored
Fixes #4974. R=rsc, bradfitz, r CC=golang-dev https://golang.org/cl/7545043
-
Rob Pike authored
It's a common mistake to build a recursive String method; explain it well and show how to avoid it. R=golang-dev, bradfitz, adg CC=golang-dev https://golang.org/cl/7486049
-
Rob Pike authored
See also https://golang.org/cl/7520044 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7533044
-
Brad Fitzpatrick authored
Before: BenchmarkHeaderWriteSubset 500000 2354 ns/op 197 B/op 2 allocs/op After: BenchmarkHeaderWriteSubset 1000000 2085 ns/op 0 B/op 0 allocs/op Fixes #3761 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7508043
-
Russ Cox authored
Also emit cgo_ldflag pragmas. R=golang-dev, remyoudompheng, iant CC=golang-dev https://golang.org/cl/7530043
-
Russ Cox authored
TBR=bradfitz CC=golang-dev https://golang.org/cl/7540043
-
Russ Cox authored
TBR=golang-dev CC=golang-dev https://golang.org/cl/7539043
-
Russ Cox authored
Some IDS somewhere thinks "Go http package" is a virus. Make it something else for Go 1.1. Dumb but easy. R=golang-dev, bradfitz, minux.ma CC=golang-dev https://golang.org/cl/7532043
-