]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
9 years agoall: merge default (faa3ed1dc30e) into dev.garbage
Russ Cox [Fri, 5 Dec 2014 16:45:03 +0000 (11:45 -0500)]
all: merge default (faa3ed1dc30e) into dev.garbage

9 years agoall: merge dev.cc (81884b89bd88) into default
Russ Cox [Fri, 5 Dec 2014 16:43:41 +0000 (11:43 -0500)]
all: merge dev.cc (81884b89bd88) into default

With this change, default now contains Go 1.5 work.
Any future bug fixes for Go 1.4 in the compilers or
the runtime will have to be made directly to the
release branch.

9 years ago[dev.garbage] all: merge dev.cc (81884b89bd88) into dev.garbage
Russ Cox [Fri, 5 Dec 2014 16:40:41 +0000 (11:40 -0500)]
[dev.garbage] all: merge dev.cc (81884b89bd88) into dev.garbage

TBR=rlh
CC=golang-codereviews
https://golang.org/cl/181100044

9 years ago[dev.cc] all: merge default (8d42099cdc23) into dev.cc
Russ Cox [Fri, 5 Dec 2014 16:18:10 +0000 (11:18 -0500)]
[dev.cc] all: merge default (8d42099cdc23) into dev.cc

TBR=austin
CC=golang-codereviews
https://golang.org/cl/178700044

9 years ago[dev.cc] liblink: don't patch jumps to jumps to symbols
Austin Clements [Fri, 5 Dec 2014 14:24:01 +0000 (09:24 -0500)]
[dev.cc] liblink: don't patch jumps to jumps to symbols

When liblink sees something like

       JMP x
       ...
    x: JMP y

it rewrites the first jump to jump directly to y.  This is
fine if y is a resolved label.  However, it *also* does this
if y is a function symbol, but fails to carry over the
relocation that would later patch in that symbol's value.  As
a result, the original jump becomes either a self-jump (if
relative) or a jump to PC 0 (if absolute).

Fix this by disabling this optimization if the jump being
patched in is a jump to a symbol.

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/185890044

9 years ago[dev.cc] cmd/ld: finalize linkmode before determining whether to import runtime/cgo
Shenghou Ma [Fri, 5 Dec 2014 07:22:20 +0000 (02:22 -0500)]
[dev.cc] cmd/ld: finalize linkmode before determining whether to import runtime/cgo

Frankly, I don't understand how the current code could possibly work except
when every android program is using cgo. Discovered this while working on
the iOS port.

LGTM=crawshaw, rsc
R=rsc, crawshaw
CC=golang-codereviews
https://golang.org/cl/177470043

9 years agocmd/go: fix build
Rob Pike [Fri, 5 Dec 2014 00:37:56 +0000 (09:37 +0900)]
cmd/go: fix build
The new semantics of split require the newline be present.
The test was stale.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/182480043

9 years agocmd/go: avoid use of bufio.Scanner in generate
Rob Pike [Fri, 5 Dec 2014 00:15:38 +0000 (09:15 +0900)]
cmd/go: avoid use of bufio.Scanner in generate

Scanner can't handle stupid long lines and there are
reports of stupid long lines in production.

Note the issue isn't long "//go:generate" lines, but
any long line in any Go source file.

To be fair, if you're going to have a stupid long line
it's not a bad bet you'll want to run it through go
generate, because it's some embeddable asset that
has been machine generated. (One could ask why
that generation process didn't add a newline or two,
but we should cope anyway.)

Rewrite the file scanner in "go generate" so it can
handle arbitrarily long lines, and only stores in memory
those lines that start "//go:generate".

Also: Adjust the documentation to make clear that it
does not parse the file.

Fixes #9143.
Fixes #9196.

LGTM=rsc, dominik.honnef
R=rsc, cespare, minux, dominik.honnef
CC=golang-codereviews
https://golang.org/cl/182970043

9 years agocmd/pprof/internal/commands: add command to open browser on windows
Shenghou Ma [Thu, 4 Dec 2014 16:24:23 +0000 (11:24 -0500)]
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes #9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

9 years agolib/time: update to ICANN time zone database 2014j
Rob Pike [Thu, 4 Dec 2014 04:07:48 +0000 (20:07 -0800)]
lib/time: update to ICANN time zone database 2014j

Fixes #9189.

LGTM=dsymonds
R=golang-codereviews, dsymonds
CC=golang-codereviews
https://golang.org/cl/178660043

9 years agospec: add comment marker for consistency.
David Symonds [Wed, 3 Dec 2014 22:29:29 +0000 (09:29 +1100)]
spec: add comment marker for consistency.

LGTM=r
R=gri, r
CC=golang-codereviews
https://golang.org/cl/185830043

9 years agocmd/pprof: fix symbol resolution for remote profiles
Russ Cox [Wed, 3 Dec 2014 19:14:00 +0000 (14:14 -0500)]
cmd/pprof: fix symbol resolution for remote profiles

Fixes #9199.

LGTM=iant
R=golang-codereviews, iant
CC=austin, golang-codereviews, minux
https://golang.org/cl/183080043

9 years agocmd/go: regenerate doc.go
Dominik Honnef [Tue, 2 Dec 2014 23:28:54 +0000 (10:28 +1100)]
cmd/go: regenerate doc.go

Move change from CL 170770043 to correct file and regenerate docs
for changes from CL 164120043.

LGTM=adg
R=golang-codereviews, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/183000043

9 years agotag go1.4rc2
Andrew Gerrand [Tue, 2 Dec 2014 03:39:23 +0000 (14:39 +1100)]
tag go1.4rc2

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/178600043

9 years agoruntime: fix hang in GC due to shrinkstack vs netpoll race
Russ Cox [Mon, 1 Dec 2014 21:32:06 +0000 (16:32 -0500)]
runtime: fix hang in GC due to shrinkstack vs netpoll race

During garbage collection, after scanning a stack, we think about
shrinking it to reclaim some memory. The shrinking code (called
while the world is stopped) checked that the status was Gwaiting
or Grunnable and then changed the state to Gcopystack, to essentially
lock the stack so that no other GC thread is scanning it.
The same locking happens for stack growth (and is more necessary there).

        oldstatus = runtime·readgstatus(gp);
        oldstatus &= ~Gscan;
        if(oldstatus == Gwaiting || oldstatus == Grunnable)
                runtime·casgstatus(gp, oldstatus, Gcopystack); // oldstatus is Gwaiting or Grunnable
        else
                runtime·throw("copystack: bad status, not Gwaiting or Grunnable");

Unfortunately, "stop the world" doesn't stop everything. It stops all
normal goroutine execution, but the network polling thread is still
blocked in epoll and may wake up. If it does, and it chooses a goroutine
to mark runnable, and that goroutine is the one whose stack is shrinking,
then it can happen that between readgstatus and casgstatus, the status
changes from Gwaiting to Grunnable.

casgstatus assumes that if the status is not what is expected, it is a
transient change (like from Gwaiting to Gscanwaiting and back, or like
from Gwaiting to Gcopystack and back), and it loops until the status
has been restored to the expected value. In this case, the status has
changed semi-permanently from Gwaiting to Grunnable - it won't
change again until the GC is done and the world can continue, but the
GC is waiting for the status to change back. This wedges the program.

To fix, call a special variant of casgstatus that accepts either Gwaiting
or Grunnable as valid statuses.

Without the fix bug with the extra check+throw in casgstatus, the
program below dies in a few seconds (2-10) with GOMAXPROCS=8
on a 2012 Retina MacBook Pro. With the fix, it runs for minutes
and minutes.

package main

import (
        "io"
        "log"
        "net"
        "runtime"
)

func main() {
        const N = 100
        for i := 0; i < N; i++ {
                l, err := net.Listen("tcp", "127.0.0.1:0")
                if err != nil {
                        log.Fatal(err)
                }
                ch := make(chan net.Conn, 1)
                go func() {
                        var err error
                        c1, err := net.Dial("tcp", l.Addr().String())
                        if err != nil {
                                log.Fatal(err)
                        }
                        ch <- c1
                }()
                c2, err := l.Accept()
                if err != nil {
                        log.Fatal(err)
                }
                c1 := <-ch
                l.Close()
                go netguy(c1, c2)
                go netguy(c2, c1)
                c1.Write(make([]byte, 100))
        }
        for {
                runtime.GC()
        }
}

func netguy(r, w net.Conn) {
        buf := make([]byte, 100)
        for {
                bigstack(1000)
                _, err := io.ReadFull(r, buf)
                if err != nil {
                        log.Fatal(err)
                }
                w.Write(buf)
        }
}

var g int

func bigstack(n int) {
        var buf [100]byte
        if n > 0 {
                bigstack(n - 1)
        }
        g = int(buf[0]) + int(buf[99])
}

Fixes #9186.

LGTM=rlh
R=austin, rlh
CC=dvyukov, golang-codereviews, iant, khr, r
https://golang.org/cl/179680043

9 years agoreflect: Fix reflect.funcLayout. The GC bitmap has two bits per
Keith Randall [Mon, 1 Dec 2014 15:52:09 +0000 (07:52 -0800)]
reflect: Fix reflect.funcLayout.  The GC bitmap has two bits per
pointer, not one.

Fixes #9179

LGTM=iant, rsc
R=golang-codereviews, iant, rsc
CC=golang-codereviews
https://golang.org/cl/182160043

9 years ago[dev.cc] 9l: make R_CALLPOWER like ELF's R_PPC64_REL24
Austin Clements [Tue, 25 Nov 2014 21:00:25 +0000 (16:00 -0500)]
[dev.cc] 9l: make R_CALLPOWER like ELF's R_PPC64_REL24

These accomplished the same thing, but R_CALLPOWER expected
the whole instruction to be in the addend (and completely
overwrote what was in the text section), while R_PPC64_REL24
overwrites only bits 6 through 24 of whatever was in the text
section.  Make R_CALLPOWER work like R_PPC64_REL24 to ease the
implementation of dynamic linking.

LGTM=rsc
R=rsc
CC=golang-codereviews, minux
https://golang.org/cl/177430043

9 years ago[dev.cc] cmd/5g,cmd/6g,cmd/9g: fix warnings on Plan 9
David du Colombier [Tue, 25 Nov 2014 07:42:00 +0000 (08:42 +0100)]
[dev.cc] cmd/5g,cmd/6g,cmd/9g: fix warnings on Plan 9

warning: src/cmd/5g/reg.c:461 format mismatch d VLONG, arg 5
warning: src/cmd/6g/reg.c:396 format mismatch d VLONG, arg 5
warning: src/cmd/9g/reg.c:440 format mismatch d VLONG, arg 5

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/179300043

9 years agodoc: tidy up "Projects" page; add Go 1.4
Andrew Gerrand [Tue, 25 Nov 2014 04:41:33 +0000 (15:41 +1100)]
doc: tidy up "Projects" page; add Go 1.4

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/182750043

9 years agogo/build: build $GOOS_test.go always
Russ Cox [Tue, 25 Nov 2014 01:18:44 +0000 (20:18 -0500)]
go/build: build $GOOS_test.go always

We decided to build $GOOS.go always
but forgot to test $GOOS_test.go.

Fixes #9159.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/176290043

9 years ago[dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbage
Russ Cox [Mon, 24 Nov 2014 17:07:11 +0000 (12:07 -0500)]
[dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbage

TBR=austin
CC=golang-codereviews
https://golang.org/cl/179290043

9 years ago[dev.cc] 9g: peephole optimizer
Austin Clements [Mon, 24 Nov 2014 16:42:15 +0000 (11:42 -0500)]
[dev.cc] 9g: peephole optimizer

This was based on the 9c peephole optimizer, modified to work
with code generated by gc and use the proginfo infrastructure
in gc.

LGTM=rsc
R=rsc, bradfitz, minux
CC=golang-codereviews
https://golang.org/cl/179190043

9 years ago[dev.cc] 9g: fill progtable for CC, V, and VCC instruction variants
Austin Clements [Mon, 24 Nov 2014 16:40:36 +0000 (11:40 -0500)]
[dev.cc] 9g: fill progtable for CC, V, and VCC instruction variants

This adds some utilities for converting between the CC, V, and
VCC variants of operations and uses these to derive the
ProgInfo entries for these variants (which are identical to
the ProgInfo for the base operations).

The 9g peephole optimizer will also use these conversion
utilities.

LGTM=minux, rsc
R=rsc, dave, minux
CC=golang-codereviews
https://golang.org/cl/180110044

9 years ago[dev.cc] runtime: convert dragonfly/386 port to Go
Joel Sing [Mon, 24 Nov 2014 16:15:11 +0000 (03:15 +1100)]
[dev.cc] runtime: convert dragonfly/386 port to Go

LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/178210043

9 years ago[dev.cc] all: merge default (95f5614b4648) into dev.cc
Russ Cox [Sun, 23 Nov 2014 20:13:48 +0000 (15:13 -0500)]
[dev.cc] all: merge default (95f5614b4648) into dev.cc

TBR=austin
CC=golang-codereviews
https://golang.org/cl/177220044

9 years agoimage/jpeg: handle Read returning n > 0, err != nil in d.fill
Russ Cox [Sat, 22 Nov 2014 18:55:33 +0000 (13:55 -0500)]
image/jpeg: handle Read returning n > 0, err != nil in d.fill

Fixes #9127.

LGTM=r
R=bradfitz, r
CC=golang-codereviews, nigeltao
https://golang.org/cl/178120043

9 years agocmd/go: fix running pprof on windows.
Shenghou Ma [Sat, 22 Nov 2014 18:37:46 +0000 (13:37 -0500)]
cmd/go: fix running pprof on windows.

Fixes #9149.

LGTM=alex.brainman, rsc
R=rsc, dave, alex.brainman
CC=golang-codereviews
https://golang.org/cl/176170043

9 years ago[dev.cc] runtime: convert netbsd/386 port to Go
Joel Sing [Sat, 22 Nov 2014 11:09:11 +0000 (22:09 +1100)]
[dev.cc] runtime: convert netbsd/386 port to Go

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/177170043

9 years ago[dev.cc] runtime: convert netbsd/amd64 port to Go
Joel Sing [Sat, 22 Nov 2014 05:05:31 +0000 (16:05 +1100)]
[dev.cc] runtime: convert netbsd/amd64 port to Go

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/169620043

9 years ago[dev.cc] runtime: migrate Android/ARM port to Go.
Shenghou Ma [Fri, 21 Nov 2014 23:15:30 +0000 (18:15 -0500)]
[dev.cc] runtime: migrate Android/ARM port to Go.

I tested building Go itself, but not any of go.mobile tests.

LGTM=crawshaw
R=crawshaw, rsc
CC=golang-codereviews
https://golang.org/cl/179110043

9 years ago[dev.cc] runtime: explicitly exclude android in zgoos_linux.go
Shenghou Ma [Fri, 21 Nov 2014 23:13:59 +0000 (18:13 -0500)]
[dev.cc] runtime: explicitly exclude android in zgoos_linux.go

Otherwise both zgoos_linux.go and zgoos_android.go will be compiled
for GOOS=android.

LGTM=crawshaw, rsc
R=rsc, crawshaw
CC=golang-codereviews
https://golang.org/cl/178110043

9 years ago[dev.garbage] runtime: Stop running gs during the GCscan phase.
Rick Hudson [Fri, 21 Nov 2014 21:46:27 +0000 (16:46 -0500)]
[dev.garbage] runtime: Stop running gs during the GCscan phase.
Ensure that all gs are in a scan state when their stacks are being scanned.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/179160044

9 years ago[dev.cc] liblink: more docs on Prog and Addr fields
Austin Clements [Fri, 21 Nov 2014 20:58:29 +0000 (15:58 -0500)]
[dev.cc] liblink: more docs on Prog and Addr fields

LGTM=rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/174530043

9 years ago[dev.cc] 9g: correct bad proginfo for ADUFFZERO and ADUFFCOPY
Austin Clements [Fri, 21 Nov 2014 20:58:01 +0000 (15:58 -0500)]
[dev.cc] 9g: correct bad proginfo for ADUFFZERO and ADUFFCOPY

LGTM=rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/176130044

9 years ago[dev.garbage] runtime: add prefetcht0, prefetcht1, prefetcht2, prefetcht3, prefetchnt...
Russ Cox [Fri, 21 Nov 2014 20:57:10 +0000 (15:57 -0500)]
[dev.garbage] runtime: add prefetcht0, prefetcht1, prefetcht2, prefetcht3, prefetchnta for GC

We don't know what we need yet, so add them all.
Add them even on x86 architectures (as no-ops) so that
the GC can refer to them unconditionally.

Eventually we'll know what we want and probably
have just one 'prefetch' with an appropriate meaning
on each architecture.

LGTM=rlh
R=rlh
CC=golang-codereviews
https://golang.org/cl/179160043

9 years ago[dev.cc] liblink: fix warnings on Plan 9
David du Colombier [Fri, 21 Nov 2014 19:56:33 +0000 (20:56 +0100)]
[dev.cc] liblink: fix warnings on Plan 9

warning: src/liblink/list6.c:94 set and not used: s
warning: src/liblink/list6.c:157 format mismatch ld VLONG, arg 3
warning: src/liblink/list6.c:157 format mismatch E UINT, arg 4
warning: src/liblink/list6.c:157 format mismatch d VLONG, arg 5
warning: src/liblink/list6.c:163 set and not used: s
warning: src/liblink/list9.c:105 set and not used: s
warning: src/liblink/list9.c:185 format mismatch ld VLONG, arg 3
warning: src/liblink/list9.c:185 format mismatch E UINT, arg 4
warning: src/liblink/list9.c:185 format mismatch d VLONG, arg 5
warning: src/liblink/list9.c:193 set and not used: s

LGTM=rsc
R=rsc
CC=austin, golang-codereviews, minux
https://golang.org/cl/176130043

9 years ago[dev.cc] cmd/8g: fix warning on Plan 9
David du Colombier [Fri, 21 Nov 2014 19:44:04 +0000 (20:44 +0100)]
[dev.cc] cmd/8g: fix warning on Plan 9

warning: /usr/go/src/cmd/8g/reg.c:365 format mismatch d VLONG, arg 5

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/177160043

9 years ago[dev.cc] runtime: convert Plan 9 port to Go
David du Colombier [Fri, 21 Nov 2014 18:39:01 +0000 (19:39 +0100)]
[dev.cc] runtime: convert Plan 9 port to Go

Thanks to Aram Hăvărneanu, Nick Owens
and Russ Cox for the early reviews.

LGTM=aram, rsc
R=rsc, lucio.dere, aram, ality
CC=golang-codereviews, mischief
https://golang.org/cl/175370043

9 years ago[dev.cc] runtime: convert nacl support to Go
Russ Cox [Fri, 21 Nov 2014 15:22:18 +0000 (10:22 -0500)]
[dev.cc] runtime: convert nacl support to Go

LGTM=dave
R=minux, dave
CC=golang-codereviews
https://golang.org/cl/181030043

9 years ago[dev.cc] build: skip API checks on Windows too (not just Unix)
Russ Cox [Fri, 21 Nov 2014 05:21:49 +0000 (00:21 -0500)]
[dev.cc] build: skip API checks on Windows too (not just Unix)

TBR=brainman
CC=golang-codereviews
https://golang.org/cl/175490043

9 years ago[dev.cc] runtime: windows does not use _cgo_setenv and _cgo_unsetenv
Alex Brainman [Fri, 21 Nov 2014 04:59:22 +0000 (15:59 +1100)]
[dev.cc] runtime: windows does not use _cgo_setenv and _cgo_unsetenv

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175480043

9 years ago[dev.cc] runtime: fix windows goenvs conversion mistake
Alex Brainman [Fri, 21 Nov 2014 01:15:18 +0000 (12:15 +1100)]
[dev.cc] runtime: fix windows goenvs conversion mistake

uint16 occupies 2 bytes, not 1

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/178100043

9 years ago[dev.cc] liblink: fix Solaris build some more
Austin Clements [Thu, 20 Nov 2014 19:28:54 +0000 (14:28 -0500)]
[dev.cc] liblink: fix Solaris build some more

a->name and a->class are char, so Solaris doesn't like using
them as array indexes.  (This same problem was fixed for amd64
in CL 169630043.)

LGTM=aram, minux
R=rsc, minux, aram
CC=golang-codereviews
https://golang.org/cl/175430043

9 years ago[dev.garbage] runtime: Fix constant overflow on 32 bit machines
Rick Hudson [Thu, 20 Nov 2014 19:24:01 +0000 (14:24 -0500)]
[dev.garbage] runtime: Fix constant overflow on 32 bit machines

LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, rsc
https://golang.org/cl/180040043

9 years agogo/parser: Use test-specific filesets to avoid races.
Robert Griesemer [Thu, 20 Nov 2014 17:35:22 +0000 (09:35 -0800)]
go/parser: Use test-specific filesets to avoid races.

Only affects test code.

Fixes #9025.
Fixes #9130.

LGTM=r, adonovan
R=adonovan, r
CC=golang-codereviews
https://golang.org/cl/180920043

9 years ago[dev.garbage] runtime: Turn concurrent GC on by default. Avoid write barriers for...
Rick Hudson [Thu, 20 Nov 2014 17:08:13 +0000 (12:08 -0500)]
[dev.garbage] runtime: Turn concurrent GC on by default. Avoid write barriers for GC internal structures such as free lists.

LGTM=rsc
R=rsc
CC=golang-codereviews, rsc
https://golang.org/cl/179000043

9 years ago[dev.cc] all: merge default (e4ab8f908aac) into dev.cc
Russ Cox [Thu, 20 Nov 2014 16:48:08 +0000 (11:48 -0500)]
[dev.cc] all: merge default (e4ab8f908aac) into dev.cc

TBR=austin
CC=golang-codereviews
https://golang.org/cl/179040044

9 years ago[dev.cc] all: merge dev.power64 (f57928630b36) into dev.cc
Russ Cox [Thu, 20 Nov 2014 16:30:43 +0000 (11:30 -0500)]
[dev.cc] all: merge dev.power64 (f57928630b36) into dev.cc

This will be the last dev.power64 merge; we'll finish on dev.cc.

TBR=austin
CC=golang-codereviews
https://golang.org/cl/175420043

9 years agoruntime: fix atomic operations on non-heap addresses
Dmitriy Vyukov [Thu, 20 Nov 2014 14:51:02 +0000 (09:51 -0500)]
runtime: fix atomic operations on non-heap addresses
Race detector runtime does not tolerate operations on addresses
that was not previously declared with __tsan_map_shadow
(namely, data, bss and heap). The corresponding address
checks for atomic operations were removed in
https://golang.org/cl/111310044
Restore these checks.
It's tricker than just not calling into race runtime,
because it is the race runtime that makes the atomic
operations themselves (if we do not call into race runtime
we skip the atomic operation itself as well). So instead we call
__tsan_go_ignore_sync_start/end around the atomic operation.
This forces race runtime to skip all other processing
except than doing the atomic operation itself.
Fixes #9136.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/179030043

9 years agobuild: disable race external linking test on OS X 10.6 and earlier
Russ Cox [Thu, 20 Nov 2014 01:52:58 +0000 (20:52 -0500)]
build: disable race external linking test on OS X 10.6 and earlier

External linking doesn't work there at all.

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/176070043

9 years ago[dev.cc] runtime: convert remaining windows C code to Go
Alex Brainman [Thu, 20 Nov 2014 01:24:03 +0000 (12:24 +1100)]
[dev.cc] runtime: convert remaining windows C code to Go

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/177090043

9 years agoruntime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous
Russ Cox [Wed, 19 Nov 2014 20:25:33 +0000 (15:25 -0500)]
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

9 years ago[dev.cc] runtime: add explicit siginfo.si_addr field
Austin Clements [Wed, 19 Nov 2014 19:56:49 +0000 (14:56 -0500)]
[dev.cc] runtime: add explicit siginfo.si_addr field

struct siginfo_t's si_addr field is part of a union.
Previously, we represented this union in Go using an opaque
byte array and accessed the si_addr field using unsafe (and
wrong on 386 and arm!) pointer arithmetic.  Since si_addr is
the only field we use from this union, this replaces the
opaque byte array with an explicit declaration of the si_addr
field and accesses it directly.

LGTM=minux, rsc
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/179970044

9 years ago[dev.cc] runtime: decode power64 branch instructions the way the CPU does
Austin Clements [Wed, 19 Nov 2014 19:24:41 +0000 (14:24 -0500)]
[dev.cc] runtime: decode power64 branch instructions the way the CPU does

Previously, this used the top 8 bits of an instruction as a
sort-of opcode and ignored the top two bits of the relative
PC.  This worked because these jumps are always negative and
never big enough for the top two bits of the relative PC (also
the bottom 2 bits of the sort-of opcode) to be anything other
than 0b11, but the code is confusing because it doesn't match
the actual structure of the instruction.

Instead, use the real 6 bit opcode and use all 24 bits of
relative PC.

LGTM=rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/179960043

9 years agoundo CL 131750044 / 2d6d44ceb80e
Russ Cox [Wed, 19 Nov 2014 19:16:12 +0000 (14:16 -0500)]
undo CL 131750044 / 2d6d44ceb80e

Breaks reading from stdin in parent after exec with SysProcAttr{Setpgid: true}.

package main

import (
        "fmt"
        "os"
        "os/exec"
        "syscall"
)

func main() {
        cmd := exec.Command("true")
        cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
        cmd.Run()

        fmt.Printf("Hit enter:")
        os.Stdin.Read(make([]byte, 100))
        fmt.Printf("Bye\n")
}

In go1.3, I type enter at the prompt and the program exits.
With the CL being rolled back, the program wedges at the
prompt.

««« original CL description
syscall: SysProcAttr job control changes

Making the child's process group the foreground process group and
placing the child in a specific process group involves co-ordination
between the parent and child that must be done post-fork but pre-exec.

LGTM=iant
R=golang-codereviews, gobot, iant, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/131750044

»»»

LGTM=minux, dneil
R=dneil, minux
CC=golang-codereviews, iant, michael.p.macinnis
https://golang.org/cl/174450043

9 years ago[dev.cc] runtime: allow more address bits in lfstack on Power64
Austin Clements [Wed, 19 Nov 2014 16:30:58 +0000 (11:30 -0500)]
[dev.cc] runtime: allow more address bits in lfstack on Power64

Previously, lfstack assumed Linux limited user space addresses
to 43 bits on Power64 based on a paper from 2001.  It turns
out the limit is now 46 bits, so lfstack was truncating
pointers.

Raise the limit to 48 bits (for some future proofing and to
make it match amd64) and add a self-test that will fail in a
useful way if ever unpack(pack(x)) != x.

With this change, dev.cc passes all.bash on power64le.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/174430043

9 years ago[dev.cc] runtime: update sys_windows_386.s and sys_windows_amd64.s for Go conversion
Alex Brainman [Wed, 19 Nov 2014 00:55:15 +0000 (11:55 +1100)]
[dev.cc] runtime: update sys_windows_386.s and sys_windows_amd64.s for Go conversion

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/176970043

9 years ago[dev.cc] runtime: merge power64 onM/onM_signalok into systemstack
Austin Clements [Tue, 18 Nov 2014 20:50:36 +0000 (15:50 -0500)]
[dev.cc] runtime: merge power64 onM/onM_signalok into systemstack

This is the power64 component of CL 174950043.

With this, dev.cc compiles on power64 and power64le and passes
most tests if GOGC=off (but crashes in go_bootstrap if GC is
on).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175290043

9 years ago[dev.cc] runtime: catch defs_linux_power64*.go up to other archs
Austin Clements [Tue, 18 Nov 2014 20:19:48 +0000 (15:19 -0500)]
[dev.cc] runtime: catch defs_linux_power64*.go up to other archs

Fix a constant conversion error.  Add set_{sec,nsec} for
timespec and set_usec for timeval.  Fix type of
sigaltstackt.ss_size.

LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/180840043

9 years ago[dev.cc] runtime: convert power64-specific .c and .h files to Go
Austin Clements [Tue, 18 Nov 2014 20:19:37 +0000 (15:19 -0500)]
[dev.cc] runtime: convert power64-specific .c and .h files to Go

The power64 equivalent of CL 174860043

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/179890043

9 years ago[dev.cc] runtime: convert power64 assembly files for C to Go transition
Austin Clements [Tue, 18 Nov 2014 20:19:26 +0000 (15:19 -0500)]
[dev.cc] runtime: convert power64 assembly files for C to Go transition

The power64 equivalent of CL 168510043

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/178940043

9 years ago[dev.cc] runtime: convert power64 signal handlers from C to Go
Austin Clements [Tue, 18 Nov 2014 20:19:09 +0000 (15:19 -0500)]
[dev.cc] runtime: convert power64 signal handlers from C to Go

The power64 equivalent of CL 168500044

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175280043

9 years ago[dev.cc] 9a: make RET a synonym for RETURN; use "g" instead of "R30"
Austin Clements [Tue, 18 Nov 2014 20:18:52 +0000 (15:18 -0500)]
[dev.cc] 9a: make RET a synonym for RETURN; use "g" instead of "R30"

Previously, 9a was the only assembler that had a different
name for RET, causing unnecessary friction in simple files
that otherwise assembled on all architectures.  Add RET so
these work on 9a.

This also renames "R30" to "g" to avoid unintentionally
clobbering g in assembly code.  This parallels a change made
to 5a.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/178030043

9 years ago[dev.cc] cmd/9c: remove
Austin Clements [Tue, 18 Nov 2014 20:18:42 +0000 (15:18 -0500)]
[dev.cc] cmd/9c: remove

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175940043

9 years ago[dev.cc] runtime: generate GOOS- and GOARCH-specific files with go generate
Russ Cox [Tue, 18 Nov 2014 17:07:50 +0000 (12:07 -0500)]
[dev.cc] runtime: generate GOOS- and GOARCH-specific files with go generate

Eventually I'd like almost everything cmd/dist generates
to be done with 'go generate' and checked in, to simplify
the bootstrap process. The only thing cmd/dist really needs
to do is write things like the current experiment info and
the current version.

This is a first step toward that. It replaces the _NaCl etc
constants with generated ones goos_nacl, goos_darwin,
goarch_386, and so on.

LGTM=dave, austin
R=austin, dave, bradfitz
CC=golang-codereviews, iant, r
https://golang.org/cl/174290043

9 years ago[dev.cc] runtime: convert defs_linux_power64*.h to go
Russ Cox [Tue, 18 Nov 2014 16:38:23 +0000 (11:38 -0500)]
[dev.cc] runtime: convert defs_linux_power64*.h to go

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/176990043

9 years ago[dev.cc] runtime: two missed references to "M stack"
Austin Clements [Tue, 18 Nov 2014 14:54:50 +0000 (09:54 -0500)]
[dev.cc] runtime: two missed references to "M stack"

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/177940043

9 years agodoc/go1.4.html: rewrite first sentence to make it clearer
Rob Pike [Tue, 18 Nov 2014 02:32:00 +0000 (13:32 +1100)]
doc/go1.4.html: rewrite first sentence to make it clearer
The grammar was atrocious, probably the victim of an editing error.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/178910043

9 years agoruntime: fix getcallersp documentation
Alex Brainman [Mon, 17 Nov 2014 22:55:15 +0000 (09:55 +1100)]
runtime: fix getcallersp documentation

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/180760043

9 years ago[dev.cc] cmd/gc: fix warning on Plan 9
David du Colombier [Mon, 17 Nov 2014 19:46:42 +0000 (20:46 +0100)]
[dev.cc] cmd/gc: fix warning on Plan 9

warning: src/cmd/gc/walk.c:1769 set and not used: on

LGTM=rsc
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/175850043

9 years agocmd/pprof: fix EOF handling when getting function source
Austin Clements [Mon, 17 Nov 2014 19:44:41 +0000 (14:44 -0500)]
cmd/pprof: fix EOF handling when getting function source

getFunctionSource gathers five lines of "margin" around every
requested sample line.  However, if this margin went past the
end of the source file, getFunctionSource would encounter an
io.EOF error and abort with this error, resulting in listings
like

    (pprof) list main.main
    ROUTINE ======================== main.main in ...
    0      8.33s (flat, cum) 99.17% of Total
    Error: EOF
    (pprof)

Modify the error handling in getFunctionSource so io.EOF is
always considered non-fatal.  If it reaches EOF, it simply
returns the lines it has.

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/172600043

9 years ago[dev.cc] runtime: replace deleted netpollfd function
Alex Brainman [Mon, 17 Nov 2014 06:18:21 +0000 (17:18 +1100)]
[dev.cc] runtime: replace deleted netpollfd function

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/169710043

9 years agobump go1.4rc1 tag
Andrew Gerrand [Mon, 17 Nov 2014 03:41:18 +0000 (14:41 +1100)]
bump go1.4rc1 tag

Now that the build and builders are fixed, we're good to go.

LGTM=dsymonds
R=rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/177900043

9 years agoundo CL 176900044 / 561398621ba7
David Symonds [Mon, 17 Nov 2014 03:21:29 +0000 (14:21 +1100)]
undo CL 176900044 / 561398621ba7

Turns out it *is* needed because the cmd/link tests expect to find their own files.

««« original CL description
misc/nacl: exclude cmd/link from the test zip.

It does not appear to be necessary, and cmd/link does not appear in release branches.

LGTM=rsc
R=adg, rsc
CC=golang-codereviews
https://golang.org/cl/176900044
»»»

TBR=rsc
R=adg, rsc
CC=golang-codereviews
https://golang.org/cl/175870045

9 years agomisc/nacl: exclude cmd/link from the test zip.
David Symonds [Mon, 17 Nov 2014 03:04:43 +0000 (14:04 +1100)]
misc/nacl: exclude cmd/link from the test zip.

It does not appear to be necessary, and cmd/link does not appear in release branches.

LGTM=rsc
R=adg, rsc
CC=golang-codereviews
https://golang.org/cl/176900044

9 years agodebug/goobj: move to cmd/internal/goobj
Russ Cox [Mon, 17 Nov 2014 01:52:45 +0000 (20:52 -0500)]
debug/goobj: move to cmd/internal/goobj

debug/goobj is not ready to be published but it is
needed for the various binary-reading commands.
Move to cmd/internal/goobj.

(The Go 1.3 release branch deleted it, but that's not
an option anymore due to the command dependencies.
The API is still not vetted nor terribly well designed.)

LGTM=adg, dsymonds
R=adg, dsymonds
CC=golang-codereviews
https://golang.org/cl/174250043

9 years agomisc/makerelease: use release-branch.go1.4 for tools and tour
Andrew Gerrand [Mon, 17 Nov 2014 00:27:53 +0000 (11:27 +1100)]
misc/makerelease: use release-branch.go1.4 for tools and tour

TBR=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175870043

9 years agotag go1.4rc1
Andrew Gerrand [Mon, 17 Nov 2014 00:20:53 +0000 (11:20 +1100)]
tag go1.4rc1

LGTM=dsymonds
R=rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/175840043

9 years ago[dev.cc] cmd/8g: work around "out of fixed registers" on Plan 9
David du Colombier [Sun, 16 Nov 2014 21:55:07 +0000 (22:55 +0100)]
[dev.cc] cmd/8g: work around "out of fixed registers" on Plan 9

This change works around the "out of fixed registers"
issue with the Plan 9 C compiler on 386, introduced by
the Bits change to uint64 in CL 169060043.

The purpose of this CL is to be able to properly
follow the conversion of the Plan 9 runtime to Go
on the Plan 9 builders.

This CL could be reverted once the Go compilers will
be converted to Go.

Thanks to Nick Owens for investigating this issue.

LGTM=rsc
R=rsc
CC=austin, golang-codereviews, mischief
https://golang.org/cl/177860043

9 years ago[dev.garbage] all: merge dev.cc (723ca3789b88) into dev.garbage
Russ Cox [Sun, 16 Nov 2014 21:53:53 +0000 (16:53 -0500)]
[dev.garbage] all: merge dev.cc (723ca3789b88) into dev.garbage

Brings in Linux time signature fixes. Should fix build.

TBR=austin
CC=golang-codereviews
https://golang.org/cl/176870043

9 years agoruntime: fix sudog leak
Russ Cox [Sun, 16 Nov 2014 21:44:45 +0000 (16:44 -0500)]
runtime: fix sudog leak

The SudoG used to sit on the stack, so it was cheap to allocated
and didn't need to be cleaned up when finished.

For the conversion to Go, we had to move sudog off the stack
for a few reasons, so we added a cache of recently used sudogs
to keep allocation cheap. But we didn't add any of the necessary
cleanup before adding a SudoG to the new cache, and so the cached
SudoGs had stale pointers inside them that have caused all sorts
of awful, hard to debug problems.

CL 155760043 made sure SudoG.elem is cleaned up.
CL 150520043 made sure SudoG.selectdone is cleaned up.

This CL makes sure SudoG.next, SudoG.prev, and SudoG.waitlink
are cleaned up. I should have done this when I did the other two
fields; instead I wasted a week tracking down a leak they caused.

A dangling SudoG.waitlink can point into a sudogcache list that
has been "forgotten" in order to let the GC collect it, but that
dangling .waitlink keeps the list from being collected.
And then the list holding the SudoG with the dangling waitlink
can find itself in the same situation, and so on. We end up
with lists of lists of unusable SudoGs that are still linked into
the object graph and never collected (given the right mix of
non-trivial selects and non-channel synchronization).

More details in golang.org/issue/9110.

Fixes #9110.

LGTM=r
R=r
CC=dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/177870043

9 years agoruntime: update URL for heap dump format
Russ Cox [Sun, 16 Nov 2014 19:25:33 +0000 (14:25 -0500)]
runtime: update URL for heap dump format

I just created that redirect, so we can change
it once the wiki moves.

LGTM=bradfitz, khr
R=khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/177780043

9 years ago[dev.garbage] all: merge dev.cc into dev.garbage
Russ Cox [Sat, 15 Nov 2014 13:00:38 +0000 (08:00 -0500)]
[dev.garbage] all: merge dev.cc into dev.garbage

The garbage collector is now written in Go.
There is plenty to clean up (just like on dev.cc).

all.bash passes on darwin/amd64, darwin/386, linux/amd64, linux/386.

TBR=rlh
R=austin, rlh, bradfitz
CC=golang-codereviews
https://golang.org/cl/173250043

9 years ago[dev.cc] runtime: fix _sfloat thunk
Dave Cheney [Sat, 15 Nov 2014 02:27:05 +0000 (13:27 +1100)]
[dev.cc] runtime: fix _sfloat thunk

* _sfloat dispatches to runtime._sfloat2 with the Go calling convention, so the seecond argument is a [15]uint32, not a *[15]uint32.
* adjust _sfloat2 to return the new pc in 68(R13) as expected.

LGTM=rsc
R=minux, austin, rsc
CC=golang-codereviews
https://golang.org/cl/174160043

9 years ago[dev.cc] runtime: fix bus error accessing auxv random data on arm5
Dave Cheney [Fri, 14 Nov 2014 22:57:02 +0000 (09:57 +1100)]
[dev.cc] runtime: fix bus error accessing auxv random data on arm5

It's rather unsporting of the kernel to give us a pointer to unaligned memory.

This fixes one crash, the next crash occurs in the soft float emulation.

LGTM=minux, rsc, austin
R=minux, rsc, austin
CC=golang-codereviews
https://golang.org/cl/177730043

9 years ago[dev.cc] liblink: fix warnings on Plan 9
David du Colombier [Fri, 14 Nov 2014 21:57:33 +0000 (22:57 +0100)]
[dev.cc] liblink: fix warnings on Plan 9

warning: src/liblink/asm9.c:501 set and not used: bflag
warning: src/liblink/list9.c:259 format mismatch .5lux INT, arg 4
warning: src/liblink/list9.c:261 format mismatch .5lux INT, arg 3
warning: src/liblink/list9.c:319 more arguments than format VLONG
warning: src/liblink/obj9.c:222 set and not used: autoffset

LGTM=bradfitz, austin
R=rsc, bradfitz
CC=austin, golang-codereviews
https://golang.org/cl/175070043

9 years ago[dev.power64] liblink: fix Solaris build
Austin Clements [Fri, 14 Nov 2014 20:53:15 +0000 (15:53 -0500)]
[dev.power64] liblink: fix Solaris build

a->class is a char.  Boo hoo.

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/169630043

9 years ago[dev.cc] runtime: change set_sec to take int64
Russ Cox [Fri, 14 Nov 2014 19:50:00 +0000 (14:50 -0500)]
[dev.cc] runtime: change set_sec to take int64

Fixes build.
Tested that all these systems can make.bash.

TBR=austin
CC=golang-codereviews
https://golang.org/cl/177770043

9 years ago[dev.power64] 6g,9g: formatters for Prog and Addr details
Austin Clements [Fri, 14 Nov 2014 18:58:31 +0000 (13:58 -0500)]
[dev.power64] 6g,9g: formatters for Prog and Addr details

The pretty printers for these make it hard to understand
what's actually in the fields of these structures.  These
"ugly printers" show exactly what's in each field, which can
be useful for understanding and debugging code.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175780043

9 years ago[dev.cc] runtime: fix lfstack for amd64 addresses in top half of addr space
Russ Cox [Fri, 14 Nov 2014 17:55:23 +0000 (12:55 -0500)]
[dev.cc] runtime: fix lfstack for amd64 addresses in top half of addr space

While we are here, add the linux/power64 version.

LGTM=austin
R=austin
CC=aram, dvyukov, golang-codereviews
https://golang.org/cl/177750043

9 years ago[dev.cc] runtime: fix linux build
Russ Cox [Fri, 14 Nov 2014 17:55:10 +0000 (12:55 -0500)]
[dev.cc] runtime: fix linux build

TBR=austin
CC=golang-codereviews
https://golang.org/cl/176760044

9 years ago[dev.cc] runtime: convert dragonfly/amd64 port to Go
Joel Sing [Fri, 14 Nov 2014 17:47:20 +0000 (04:47 +1100)]
[dev.cc] runtime: convert dragonfly/amd64 port to Go

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/176750043

9 years ago[dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.cc
Russ Cox [Fri, 14 Nov 2014 17:10:52 +0000 (12:10 -0500)]
[dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.cc

This is to reduce the delta between dev.cc and dev.garbage to just garbage collector changes.

These are the files that had merge conflicts and have been edited by hand:
        malloc.go
        mem_linux.go
        mgc.go
        os1_linux.go
        proc1.go
        panic1.go
        runtime1.go

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/174180043

9 years ago[dev.garbage] all: merge dev.power64 (7667e41f3ced) into dev.garbage
Russ Cox [Fri, 14 Nov 2014 17:09:42 +0000 (12:09 -0500)]
[dev.garbage] all: merge dev.power64 (7667e41f3ced) into dev.garbage

Now the only difference between dev.cc and dev.garbage
is the runtime conversion on the one side and the
garbage collection on the other. They both have the
same set of changes from default and dev.power64.

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/172570043

9 years ago[dev.power64] liblink: generate dnames[5689] for D_* constants
Austin Clements [Fri, 14 Nov 2014 17:08:46 +0000 (12:08 -0500)]
[dev.power64] liblink: generate dnames[5689] for D_* constants

This is more complicated than the other enums because the D_*
enums are full of explicit initializers and repeated values.
This tries its best.  (This will get much cleaner once we
tease these constants apart better.)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/166700043

9 years ago[dev.power64] 5g,6g,8g,9g: debug prints for regopt pass 6 and paint2
Austin Clements [Fri, 14 Nov 2014 16:56:31 +0000 (11:56 -0500)]
[dev.power64] 5g,6g,8g,9g: debug prints for regopt pass 6 and paint2

Theses were very helpful in understanding the regions and
register selection when porting regopt to 9g.  Add them to the
other compilers (and improve 9g's successor debug print).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/174130043

9 years ago[dev.cc] runtime: convert openbsd/386 port to Go
Joel Sing [Fri, 14 Nov 2014 16:55:14 +0000 (03:55 +1100)]
[dev.cc] runtime: convert openbsd/386 port to Go

LGTM=rsc
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/173200044

9 years ago[dev.garbage] all: merge default (f38460037b72) into dev.garbage
Russ Cox [Fri, 14 Nov 2014 16:37:54 +0000 (11:37 -0500)]
[dev.garbage] all: merge default (f38460037b72) into dev.garbage

This is the revision that dev.cc is branched from.

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/169590043

9 years ago[dev.power64] 5g,6g,8g: synchronize documentation for regopt structures
Austin Clements [Fri, 14 Nov 2014 16:07:33 +0000 (11:07 -0500)]
[dev.power64] 5g,6g,8g: synchronize documentation for regopt structures

I added several comments to the regopt-related structures when
porting it to 9g.  Synchronize those comments back in to the
other compilers.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175720043

9 years ago[dev.cc] runtime: fix nil pointer crash handler bug on Solaris
Aram Hăvărneanu [Fri, 14 Nov 2014 13:25:49 +0000 (14:25 +0100)]
[dev.cc] runtime: fix nil pointer crash handler bug on Solaris

This change fixes the Solaris port.

LGTM=dave, rsc
R=rsc, dave
CC=brad, golang-codereviews
https://golang.org/cl/168600045