]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agobuild: adjustments for move from src/pkg to src
Russ Cox [Mon, 8 Sep 2014 04:06:45 +0000 (00:06 -0400)]
build: adjustments for move from src/pkg to src

This CL adjusts code referring to src/pkg to refer to src.

Immediately after submitting this CL, I will submit
a change doing 'hg mv src/pkg/* src'.
That change will be too large to review with Rietveld
but will contain only the 'hg mv'.

This CL will break the build.
The followup 'hg mv' will fix it.

For more about the move, see golang.org/s/go14nopkg.

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

10 years agodoc: add a few http items to go1.4.txt
Brad Fitzpatrick [Mon, 8 Sep 2014 03:52:22 +0000 (20:52 -0700)]
doc: add a few http items to go1.4.txt

CC=golang-codereviews
https://golang.org/cl/132670045

10 years agonet/http: add Transport.DialTLS hook
Brad Fitzpatrick [Mon, 8 Sep 2014 03:48:40 +0000 (20:48 -0700)]
net/http: add Transport.DialTLS hook

Per discussions out of https://golang.org/cl/128930043/
and golang-nuts threads and with agl.

Fixes #8522

LGTM=agl, adg
R=agl, c, adg
CC=c, golang-codereviews
https://golang.org/cl/137940043

10 years agoruntime: implement time.now in assembly on plan9, solaris, windows
Russ Cox [Mon, 8 Sep 2014 03:40:59 +0000 (23:40 -0400)]
runtime: implement time.now in assembly on plan9, solaris, windows

These all used a C implementation that contained 64-bit divide by 1000000000.
On 32-bit systems that ends up in the 64-bit C divide support, which makes
other calls and ends up using a fair amount of stack. We could convert them
to Go but then they'd still end up in software 64-bit divide code. That would
be okay, because Go code can split the stack, but it's still unnecessary.

Write time·now in assembly, just like on all the other systems, and use the
actual hardware support for 64/32 -> 64/32 division. This cuts the software
routines out entirely.

The actual code to do the division is copied and pasted from the sys_darwin_*.s files.

LGTM=alex.brainman
R=golang-codereviews, alex.brainman
CC=aram, golang-codereviews, iant, khr, r
https://golang.org/cl/136300043

10 years agonet/http/httptest: delete TestIssue7264
Russ Cox [Mon, 8 Sep 2014 03:40:27 +0000 (23:40 -0400)]
net/http/httptest: delete TestIssue7264

Now it's failing on Windows:

panic: httptest: failed to listen on a port: listen tcp 127.0.0.1:0:
listen: An operation on a socket could not be performed because the
system lacked sufficient buffer space or because a queue was full.

Since we can't seem to understand what the test is trying to test,
and because it is causing problems on multiple systems,
delete it.

Fixes #7264.

TBR=bradfitz
CC=brainman, golang-codereviews
https://golang.org/cl/141210043

10 years agoruntime: fix semacquire->acquireSudog->malloc->gogc->semacquire loop
Russ Cox [Mon, 8 Sep 2014 03:16:12 +0000 (23:16 -0400)]
runtime: fix semacquire->acquireSudog->malloc->gogc->semacquire loop

This is what broke the build at
http://build.golang.org/log/d9c6d334be16cbab85e99fddc6b4ba034319bd4e

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

10 years agonet/http/httptest: fix deadlock in TestIssue7264
Russ Cox [Mon, 8 Sep 2014 00:13:35 +0000 (20:13 -0400)]
net/http/httptest: fix deadlock in TestIssue7264

I am seeing deadlocks waiting on <-inHandler.
It seems to me that there is no guarantee that the
handler actually runs, if the client does

        write header
        close connection

fast enough. The server might see the EOF on the
connection before it manages to invoke the handler.

This change fixes the deadlock, but it may make
the test not actually test anything. Not sure.

LGTM=bradfitz
R=bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/140970043

10 years agoruntime: save g to TLS more aggressively
Russ Cox [Sun, 7 Sep 2014 23:47:40 +0000 (19:47 -0400)]
runtime: save g to TLS more aggressively

This is one of those "how did this ever work?" bugs.
The current build failures are happening because
a fault comes up while executing on m->curg on a
system-created thread using an m obtained from needm,
but TLS is set to m->g0, not m->curg. On fault,
sigtramp starts executing, assumes r10 (g) might be
incorrect, reloads it from TLS, and gets m->g0, not
m->curg. Then sighandler dutifully pushes a call to
sigpanic onto the stack and returns to it.
We're now executing on the m->curg stack but with
g=m->g0. Sigpanic does a stack split check, sees that
the SP is not in range (50% chance depending on relative
ordering of m->g0's and m->curg's stacks), and then
calls morestack. Morestack sees that g=m->g0 and
crashes the program.

The fix is to replace every change of g in asm_arm.s
with a call to a function that both updates g and
saves the updated g to TLS.

Why did it start happening? That's unclear.
Unfortunately there were other bugs in the initial
checkin that mask exactly which of a sequence of
CLs started the behavior where sigpanic would end
up tripping the stack split.

Fixes arm build.
Fixes #8675.

LGTM=iant
R=golang-codereviews, iant
CC=dave, golang-codereviews, khr, minux, r
https://golang.org/cl/135570043

10 years agocrypto/tls: print unexpected error in test
Russ Cox [Sun, 7 Sep 2014 13:07:19 +0000 (09:07 -0400)]
crypto/tls: print unexpected error in test

Maybe will help us understand Solaris build failure.

TBR=aram
CC=golang-codereviews
https://golang.org/cl/139290043

10 years agoliblink: fix arm wrapper prologue
Russ Cox [Sun, 7 Sep 2014 12:59:20 +0000 (08:59 -0400)]
liblink: fix arm wrapper prologue

Fixes arm build.

TBR=khr
CC=golang-codereviews
https://golang.org/cl/132700043

10 years agobuild: fix windows make.bat
Russ Cox [Sun, 7 Sep 2014 11:31:53 +0000 (07:31 -0400)]
build: fix windows make.bat

The Unix make.bash builds cmd/dist from *.c.
make.bat apparently does not.

TBR=r
CC=golang-codereviews
https://golang.org/cl/137280043

10 years agocmd/dist: remove goc2c
Russ Cox [Sun, 7 Sep 2014 11:23:49 +0000 (07:23 -0400)]
cmd/dist: remove goc2c

After the three pending CLs listed below, there will be no more .goc files.

134580043 runtime: move stubs.goc code into runtime.c
133670043 runtime: fix windows syscalls for copying stacks
141180043 runtime: eliminate Go -> C -> block paths for Solaris

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

10 years agoruntime: fix nacl/amd64p32 build
Russ Cox [Sun, 7 Sep 2014 11:23:18 +0000 (07:23 -0400)]
runtime: fix nacl/amd64p32 build

Update #8675
Fixes nacl/amd64p32 build.

TBR=khr
CC=golang-codereviews
https://golang.org/cl/141140045

10 years agoruntime: fix windows syscalls for copying stacks
Russ Cox [Sun, 7 Sep 2014 01:19:24 +0000 (21:19 -0400)]
runtime: fix windows syscalls for copying stacks

Syscall and everything it calls must be nosplit:
we cannot split a stack once Syscall has been invoked,
because we don't know which of its arguments are
pointers.

LGTM=khr, r, alex.brainman
R=dvyukov, iant, khr, r, bradfitz, alex.brainman
CC=golang-codereviews
https://golang.org/cl/133670043

10 years agoruntime: eliminate Go -> C -> block paths for Solaris
Russ Cox [Sun, 7 Sep 2014 01:16:35 +0000 (21:16 -0400)]
runtime: eliminate Go -> C -> block paths for Solaris

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

10 years agoruntime: increase stack split limit again
Russ Cox [Sun, 7 Sep 2014 01:16:13 +0000 (21:16 -0400)]
runtime: increase stack split limit again

Increase NOSPLIT reservation from 192 to 384 bytes.
The problem is that the non-Unix systems (Solaris and Windows)
just can't make system calls in a small amount of space,
and then worse they do things that are complex enough
to warrant calling runtime.throw on failure.
We don't have time to rewrite the code to use less stack.

I'm not happy about this, but it's still a small amount.

The good news is that we're doing this to get to only
using copying stacks for stack growth. Once that is true,
we can drop the default stack size from 8k to 4k, which
should more than make up for the bytes we're losing here.

LGTM=r
R=iant, r, bradfitz, aram.h
CC=golang-codereviews
https://golang.org/cl/140350043

10 years agomisc/makerelease: make goimports-safe
Russ Cox [Sun, 7 Sep 2014 01:10:06 +0000 (21:10 -0400)]
misc/makerelease: make goimports-safe

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

10 years agocmd/yacc: move cmd/yacc/expr to cmd/yacc/testdata/expr
Russ Cox [Sat, 6 Sep 2014 19:27:52 +0000 (15:27 -0400)]
cmd/yacc: move cmd/yacc/expr to cmd/yacc/testdata/expr

This will keep the go command from trying to build it
when the cmd/ tree is no longer a special case.

Also update doc.go to refer to the correct location.
(It was incorrect even before this CL.)

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

10 years agoruntime/cgo: use just #include "textflag.h"
Russ Cox [Sat, 6 Sep 2014 19:27:39 +0000 (15:27 -0400)]
runtime/cgo: use just #include "textflag.h"

This will withstand the src/pkg/ to src/ move.

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

10 years agoruntime: move stubs.goc code into runtime.c
Russ Cox [Sat, 6 Sep 2014 19:27:26 +0000 (15:27 -0400)]
runtime: move stubs.goc code into runtime.c

Now that the calling conventions are the same,
there's no danger to using plain C for these.

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

10 years agoliblink: fix arm build errors
Russ Cox [Sat, 6 Sep 2014 18:53:44 +0000 (14:53 -0400)]
liblink: fix arm build errors

This was supposed to be in CL 135490044
but got lost in a transfer from machine to machine.

TBR=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/135560043

10 years agoruntime, syscall: rewrite syscall_solaris.goc in Go
Aram Hăvărneanu [Sat, 6 Sep 2014 17:35:46 +0000 (19:35 +0200)]
runtime, syscall: rewrite syscall_solaris.goc in Go

LGTM=dave, rsc
R=khr, dvyukov, dave, gobot, rsc
CC=golang-codereviews, rsc
https://golang.org/cl/133220044

10 years agoruntime: fix panic/wrapper/recover math
Russ Cox [Sat, 6 Sep 2014 17:19:08 +0000 (13:19 -0400)]
runtime: fix panic/wrapper/recover math

The gp->panicwrap adjustment is just fatally flawed.
Now that there is a Panic.argp field, update that instead.
That can be done on entry only, so that unwinding doesn't
need to worry about undoing anything. The wrappers
emit a few more instructions in the prologue but everything
else in the system gets much simpler.

It also fixes (without trying) a broken test I never checked in.

Fixes #7491.

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

10 years agoruntime: badreflectcall runs on the G stack - convert to Go.
Keith Randall [Sat, 6 Sep 2014 17:12:47 +0000 (10:12 -0700)]
runtime: badreflectcall runs on the G stack - convert to Go.

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

10 years agoruntime: get rid of other Go->C calls in test exports.
Keith Randall [Sat, 6 Sep 2014 17:07:23 +0000 (10:07 -0700)]
runtime: get rid of other Go->C calls in test exports.

testSchedLocal* tests need to malloc now because their
stack frames are too big to fit on the G0 stack.

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

10 years agoruntime: move gostringw and gogobytes test stubs to Go.
Keith Randall [Fri, 5 Sep 2014 22:01:09 +0000 (15:01 -0700)]
runtime: move gostringw and gogobytes test stubs to Go.

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

10 years agoruntime: run getgcmask on the M stack.
Keith Randall [Fri, 5 Sep 2014 21:59:31 +0000 (14:59 -0700)]
runtime: run getgcmask on the M stack.

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

10 years agoruntime: disable StackCopyAlways
Russ Cox [Fri, 5 Sep 2014 21:00:32 +0000 (17:00 -0400)]
runtime: disable StackCopyAlways

I forgot to clear this before submitting.

TBR=khr
CC=golang-codereviews
https://golang.org/cl/132640044

10 years agoruntime: use reflect.call during panic instead of newstackcall
Russ Cox [Fri, 5 Sep 2014 20:51:45 +0000 (16:51 -0400)]
runtime: use reflect.call during panic instead of newstackcall

newstackcall creates a new stack segment, and we want to
be able to throw away all that code.

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

10 years agomisc/cgo/test: make issue5548 test pickier
Russ Cox [Fri, 5 Sep 2014 18:59:09 +0000 (14:59 -0400)]
misc/cgo/test: make issue5548 test pickier

If there is doubt about passing arguments correctly
(as there is in this test), there should be doubt about
getting the results back intact too. Using 0 and 1
(especially 0 for success) makes it easy to get a PASS
accidentally when the return value is not actually
being propagated. Use less common values.

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

10 years agoruntime: handle nil ptr load/store in arm software floating point
Russ Cox [Fri, 5 Sep 2014 18:58:54 +0000 (14:58 -0400)]
runtime: handle nil ptr load/store in arm software floating point

We cannot let a real panic start there, because there is C code
on the stack, and worse, there is an assembly frame with a
saved copy of the registers and we have no idea which ones
are pointers.

Instead, detect the nil ptr load/store and return out of the C
and assembly into a stub that will start the call to sigpanic.

Fixes GOARM=5 build.

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

10 years agoruntime: clean up sigqueue.go
Russ Cox [Fri, 5 Sep 2014 18:38:29 +0000 (14:38 -0400)]
runtime: clean up sigqueue.go

Minor changes to make logic clearer.
Observed while working on the conversion.

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

10 years agonet: temporarily skip TestAcceptIgnoreSomeErrors
Alex Brainman [Fri, 5 Sep 2014 15:48:21 +0000 (08:48 -0700)]
net: temporarily skip TestAcceptIgnoreSomeErrors

Update #8662

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

10 years agoruntime: convert panic/recover to Go
Keith Randall [Fri, 5 Sep 2014 14:04:16 +0000 (10:04 -0400)]
runtime: convert panic/recover to Go

created panic1.go just so diffs were available.
After this CL is in, I'd like to move panic.go -> defer.go
and panic1.go -> panic.go.

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

10 years agoruntime: use cas loop to coordinate with sigprof
Russ Cox [Fri, 5 Sep 2014 03:14:21 +0000 (23:14 -0400)]
runtime: use cas loop to coordinate with sigprof

sigprof and setcpuprofilerate coordinate the enabling/disabling
of the handler using a Mutex. This has always been a bit dodgy:
setcpuprofilerate must be careful to turn off signals before acquiring
the lock to avoid a deadlock.

Now the lock implementations use onM, and onM isn't okay on the
signal stack. We know how to make it okay, but it's more work than
is probably worth doing.

Since this is super-dodgy anyway, replace the lock with a simple
cas loop. It is only contended if setcpuprofilerate is being called,
and that doesn't happen frequently enough to care about the
raw speed or about using futexes/semaphores.

TBR to fix freebsd/amd64 and dragonfly/amd64 builds.
Happy to make changes in a follow-up CL.

TBR=dvyukov
CC=golang-codereviews
https://golang.org/cl/141080044

10 years agosyscall: in linux/arm Syscall, zero R3, R4, R5
Russ Cox [Fri, 5 Sep 2014 03:12:10 +0000 (23:12 -0400)]
syscall: in linux/arm Syscall, zero R3, R4, R5

The general kernel system call interface
takes 6 arguments: R0, R1, R2, R3, R4, R5.

Syscall is for calls that only need 3.
The amd64 and 386 versions zero the extra arg registers,
but the arm version does not.

func utimensat calls Syscall with 3 arguments.
The kernel expects a 4th argument.
That turns out to be whatever is in R3 at the time of the call.
CL 137160043 changed various pieces of code and apparently
changed the value left in R3 at the time of utimensat's Syscall.
This causes the kernel to return EINVAL.

Change linux/arm Syscall to zero R3, R4, R5, so that calls will
behave deterministically, even if they pass too few arguments.

Arguably, utimensat could be fixed too, but the predictable
zeroing is certainly worth doing, and once done utimensat's
use of Syscall is fine.

Fixes arm build.

TBR=bradfitz
CC=golang-codereviews
https://golang.org/cl/141080043

10 years agoruntime: use new #include "textflag.h"
Russ Cox [Fri, 5 Sep 2014 03:05:18 +0000 (23:05 -0400)]
runtime: use new #include "textflag.h"

I did this just to clean things up, but it will be important
when we drop the pkg directory later.

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

10 years agoruntime: do not stop traceback at onM
Russ Cox [Fri, 5 Sep 2014 02:48:08 +0000 (22:48 -0400)]
runtime: do not stop traceback at onM

Behavior before this CL:

1. If onM is called on a g0 stack, it just calls the given function.

2. If onM is called on a gsignal stack, it calls badonm.

3. If onM is called on a curg stack, it switches to the g0 stack
and then calls the function.

In cases 1 and 2, if the program then crashes (and badonm always does),
we want to see what called onM, but the traceback stops at onM.
In case 3, the traceback must stop at onM, because the g0
stack we are renting really does stop at onM.

The current code stops the traceback at onM to handle 3,
at the cost of making 1 and 2 crash with incomplete traces.

Change traceback to scan past onM but in case 3 make it look
like on the rented g0 stack, onM was called from mstart.
The traceback already knows that mstart is a top-of-stack function.

Alternate fix at CL 132610043 but I think this one is cleaner.
This CL makes 3 the exception, while that CL makes 1 and 2 the exception.

Submitting TBR to try to get better stack traces out of the
freebsd/amd64 builder, but happy to make changes in a
followup CL.

TBR=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/133620043

10 years agocmd/dist: another attempt at textflag.h
Russ Cox [Fri, 5 Sep 2014 01:56:11 +0000 (21:56 -0400)]
cmd/dist: another attempt at textflag.h

The old change worked fine in my client, but my client
must not have been in a completely clean state.

TBR=r
CC=golang-codereviews
https://golang.org/cl/138100043

10 years agocmd/dist: make textflag.h available in runtime, avoid android/linux conflicts
Russ Cox [Fri, 5 Sep 2014 01:22:18 +0000 (21:22 -0400)]
cmd/dist: make textflag.h available in runtime, avoid android/linux conflicts

1) cmd/dist was copying textflag.h to the build include directory,
but only after compiling package runtime. So other packages could
use it, just not runtime. Copy earlier, so that runtime can use it too.

2) We decided for android that anything marked linux is also included
in the build. The generated linux-specific files in cmd/dist must therefore
have explicit +build !android tags, or else you can't have simultaneous
linux/arm and android/arm builds in a single client. The tag was already
there for at least one file, but it was missing from many others.

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

10 years agoruntime: mark sysAlloc nosplit
Russ Cox [Fri, 5 Sep 2014 01:12:48 +0000 (21:12 -0400)]
runtime: mark sysAlloc nosplit

sysAlloc is the only mem function called from Go.

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

10 years agoruntime: more C to Go conversion adjustments
Russ Cox [Fri, 5 Sep 2014 01:12:31 +0000 (21:12 -0400)]
runtime: more C to Go conversion adjustments

Mostly NOSPLIT additions.
Had to rewrite atomic_arm.c in Go because it calls lock,
and lock is too complex.

With this CL, I find no Go -> C calls that can split the stack
on any system except Solaris and Windows.

Solaris and Windows need more work and will be done separately.

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

10 years agocmd/api: don't depend on os/user or USER to check api
Brad Fitzpatrick [Fri, 5 Sep 2014 00:13:22 +0000 (17:13 -0700)]
cmd/api: don't depend on os/user or USER to check api

The -nocgo builder failed because it has cgo disabled
as well as no USER environment variable:
http://build.golang.org/log/2250abb82f5022b72a12997b8ff89fcdeff094c9

# Checking API compatibility.
Error getting current user: user: Current not implemented on linux/amd64
exit status 1

Don't require the environment variable here.

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

10 years agogo/parser: fix "zero day" parse error
Robert Griesemer [Thu, 4 Sep 2014 22:18:32 +0000 (15:18 -0700)]
go/parser: fix "zero day" parse error

(a b string, ok bool) is not a valid signature

Fixes #8656.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/137140043

10 years agoruntime: make more functions safe for Go
Russ Cox [Thu, 4 Sep 2014 19:53:45 +0000 (15:53 -0400)]
runtime: make more functions safe for Go

Convert no-op race functions.
Everything else is tiny and gets NOSPLITs.

After this, all that is left on darwin is sysAlloc, panic, and gothrow (all pending).
There may be system-specific calls in other builds.

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

10 years agoruntime: convert cgocall to Go
Dmitriy Vyukov [Thu, 4 Sep 2014 18:40:40 +0000 (14:40 -0400)]
runtime: convert cgocall to Go

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

10 years agoruntime: use C for readgstatus, goroutine status values
Russ Cox [Thu, 4 Sep 2014 18:19:50 +0000 (14:19 -0400)]
runtime: use C for readgstatus, goroutine status values

When this code was written, there was no way for Go to
reuse the C function and enum values. Now there is.

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

10 years agoruntime: reconvert sigqueue.goc from C to Go
Russ Cox [Thu, 4 Sep 2014 17:51:12 +0000 (13:51 -0400)]
runtime: reconvert sigqueue.goc from C to Go

The original conversion in CL 132090043 cut up
the function in an attempt to avoid converting most
of the code to Go. This contorts the control flow.

While debugging the onM signal stack bug,
I reconverted sigqueue.goc in its entirety.
This restores the original control flow, which is
much easier to understand.

The current conversion is correct, it's just complex
and will be hard to maintain. The new one is as
readable as the original code.

I uploaded sigqueue.goc as the initial copy of
sigqueue.go in the CL, so if you view the diffs
of sigqueue.go comparing against patch set 2 [sic]
it will show the actual starting point.

For example:
https://golang.org/cl/136160043/diff2/20001:60001/src/pkg/runtime/sigqueue.go

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

10 years agogo/parser: initialize file set even in only some tests are run
Robert Griesemer [Thu, 4 Sep 2014 17:43:03 +0000 (10:43 -0700)]
go/parser: initialize file set even in only some tests are run

Without this fix, some tests crashed (e.g. go test -run Invalid).

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/133580043

10 years agoandroidtest.bash: drop noisy adb sync output
David Crawshaw [Thu, 4 Sep 2014 17:39:51 +0000 (13:39 -0400)]
androidtest.bash: drop noisy adb sync output

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

10 years agoruntime: fix solaris netpoll
Dmitriy Vyukov [Thu, 4 Sep 2014 07:34:01 +0000 (11:34 +0400)]
runtime: fix solaris netpoll

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

10 years agoruntime: fix netbsd build
Dmitriy Vyukov [Thu, 4 Sep 2014 07:31:39 +0000 (11:31 +0400)]
runtime: fix netbsd build

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

10 years agoruntime: fix typos
Mikio Hara [Thu, 4 Sep 2014 07:23:37 +0000 (16:23 +0900)]
runtime: fix typos

LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/141000043

10 years agoruntime: fix Plan 9 build
David du Colombier [Thu, 4 Sep 2014 06:36:18 +0000 (08:36 +0200)]
runtime: fix Plan 9 build

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

10 years agoruntime: fix arm build
Dmitriy Vyukov [Thu, 4 Sep 2014 06:16:57 +0000 (10:16 +0400)]
runtime: fix arm build

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

10 years agoruntime: convert netpoll to Go
Dmitriy Vyukov [Thu, 4 Sep 2014 06:04:04 +0000 (10:04 +0400)]
runtime: convert netpoll to Go
The common code is converted, epoll and kqueue are converted.
Windows and solaris are still C.

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

10 years agoruntime: fix nacl/amd64p32 build
Russ Cox [Thu, 4 Sep 2014 05:58:31 +0000 (01:58 -0400)]
runtime: fix nacl/amd64p32 build

BP is not a legal register on nacl.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/140980043

10 years agoruntime: fix int64 reconstruction in semasleep
Russ Cox [Thu, 4 Sep 2014 05:38:49 +0000 (01:38 -0400)]
runtime: fix int64 reconstruction in semasleep

I had this right in one of my clients, but apparently not the one I submitted from.

Fixes 386 builds.

TBR=dfc
CC=golang-codereviews
https://golang.org/cl/138000045

10 years agoruntime: fix onM test for curg on arm
Russ Cox [Thu, 4 Sep 2014 05:05:32 +0000 (01:05 -0400)]
runtime: fix onM test for curg on arm

TBR=iant
CC=golang-codereviews
https://golang.org/cl/137130043

10 years agoruntime: fix sigtrampPC on Windows
Russ Cox [Thu, 4 Sep 2014 04:54:37 +0000 (00:54 -0400)]
runtime: fix sigtrampPC on Windows

The arm5 build breakage at CL 139110043 was caused by
calling funcPC on a lessstack defined as a struct{}.
That symbol ended up with a non-4-aligned address,
which caused the memory fault that broke the builders.
The definition of lessstack was fixed in CL 140880043.

Tracking that down suggested that it would be worth
looking for the same bug elsewhere in the directory.
This is the only one I found.

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

10 years agoruntime: correct various Go -> C function calls
Russ Cox [Thu, 4 Sep 2014 04:54:06 +0000 (00:54 -0400)]
runtime: correct various Go -> C function calls

Some things get converted.
Other things (too complex or too many C deps) get onM calls.
Other things (too simple) get #pragma textflag NOSPLIT.

After this CL, the offending function list is basically:
        - panic.c
        - netpoll.goc
        - mem*.c
        - race stuff
        - readgstatus
        - entersyscall/exitsyscall

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

10 years agoruntime: reject onM calls from gsignal stack
Russ Cox [Thu, 4 Sep 2014 04:10:10 +0000 (00:10 -0400)]
runtime: reject onM calls from gsignal stack

The implementation and use patterns of onM assume
that they run on either the m->curg or m->g0 stack.

Calling onM from m->gsignal has two problems:

(1) When not on g0, onM switches to g0 and then "back" to curg.
If we didn't start at curg, bad things happen.

(2) The use of scalararg/ptrarg to pass C arguments and results
assumes that there is only one onM call at a time.
If a gsignal starts running, it may have interrupted the
setup/teardown of the args for an onM on the curg or g0 stack.
Using scalararg/ptrarg itself would smash those.

We can fix (1) by remembering what g was running before the switch.

We can fix (2) by requiring that uses of onM that might happen
on a signal handling stack must save the old scalararg/ptrarg
and restore them after the call, instead of zeroing them.
The only sane way to do this is to introduce a separate
onM_signalsafe that omits the signal check, and then if you
see a call to onM_signalsafe you know the surrounding code
must preserve the old scalararg/ptrarg values.
(The implementation would be that onM_signalsafe just calls
fn if on the signal stack or else jumps to onM. It's not necessary
to have two whole copies of the function.)

(2) is not a problem if the caller and callee are both Go and
a closure is used instead of the scalararg/ptrarg slots.

For now, I think we can avoid calling onM from code executing
on gsignal stacks, so just reject it.

In the long term, (2) goes away (as do the scalararg/ptrarg slots)
once everything is in Go, and at that point fixing (1) would be
trivial and maybe worth doing just for regularity.

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

10 years agoruntime: refactor/fix asmcgocall/asmcgocall_errno
Russ Cox [Thu, 4 Sep 2014 04:01:55 +0000 (00:01 -0400)]
runtime: refactor/fix asmcgocall/asmcgocall_errno

Instead of making asmcgocall call asmcgocall_errno,
make both load args into registers and call a shared
assembly function.

On amd64, this costs 1 word in the asmcgocall_errno path
but saves 3 words in the asmcgocall path, and the latter
is what happens on critical nosplit paths on Windows.

On arm, this fixes build failures: asmcgocall was writing
the arguments for asmcgocall_errno into the wrong
place on the stack. Passing them in registers avoids the
decision entirely.

On 386, this isn't really needed, since the nosplit paths
have twice as many words to work with, but do it for consistency.

Update #8635
Fixes arm build (except GOARM=5).

TBR=iant
CC=golang-codereviews
https://golang.org/cl/134390043

10 years agonet: fix parsing literal IPv6 address with zone identifier in builtin dns stub resolver
Mikio Hara [Thu, 4 Sep 2014 03:53:51 +0000 (12:53 +0900)]
net: fix parsing literal IPv6 address with zone identifier in builtin dns stub resolver

Fixes #8619.

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

10 years agoruntime: give 2 words back in notetsleep_internal
Russ Cox [Thu, 4 Sep 2014 03:10:15 +0000 (23:10 -0400)]
runtime: give 2 words back in notetsleep_internal

I really hoped we could avoid this nonsense, but it appears not.

Should fix windows/amd64 build breakage.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/137120043

10 years agonet: fix parsing literal IP address in builtin dns stub resolver
Mikio Hara [Thu, 4 Sep 2014 01:00:30 +0000 (10:00 +0900)]
net: fix parsing literal IP address in builtin dns stub resolver

This CL fixes a bug introduced by CL 128820043 which is that
builtin dns stub resolver doesn't work well with literal IPv6
address namesever entries in /etc/resolv.conf.

Also simplifies resolv.conf parser and adds more test cases.

LGTM=iant
R=golang-codereviews, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/140040043

10 years agotext/template: 0xef is an integer, not a floating-point value.
Rob Pike [Wed, 3 Sep 2014 22:57:03 +0000 (15:57 -0700)]
text/template: 0xef is an integer, not a floating-point value.
The discriminator in the execution engine was stupid.
Add a test to the parse package too. The problem wasn't there
but the particular case ('e' in a hex integer) was not covered.

Fixes #8622.

LGTM=ruiu
R=golang-codereviews, ruiu
CC=golang-codereviews
https://golang.org/cl/133530043

10 years agoruntime: make entersyscall/exitsyscall safe for stack splits
Russ Cox [Wed, 3 Sep 2014 21:42:35 +0000 (17:42 -0400)]
runtime: make entersyscall/exitsyscall safe for stack splits

It is fundamentally unsafe to grow the stack once someone
has made a call to syscall.Syscall. That function takes 6 uintptr
arguments, but depending on the call some are pointers.
In fact, some might be pointers to stack values, and we don't know which.
That makes it impossible to copy the stack somewhere else.
Since we want to delete all the stack splitting code, relying only
on stack copying, make sure that Syscall never needs to split the stack.

The only thing Syscall does is:
        call entersyscall
        make the system call
        call exitsyscall

As long as we make sure that entersyscall and exitsyscall
can live in the nosplit region, they won't ask for more stack.

Do this by making entersyscall and exitsyscall set up the
stack guard so that any call to a function with a split check
will cause a crash. Then move non-essential slow-path
work onto the m stack using onM and mark the rest of the
work nosplit. The linker will verify that the chain of nosplits
fits in the total nosplit budget.

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

10 years agospec: Add link to rune literals from string literals when talking about escape sequences.
Robin Eklind [Wed, 3 Sep 2014 17:44:33 +0000 (10:44 -0700)]
spec: Add link to rune literals from string literals when talking about escape sequences.

LGTM=gri
R=golang-codereviews, gobot, gri
CC=golang-codereviews
https://golang.org/cl/140750043

10 years agoruntime: convert symtab.c into symtab.go
Russ Cox [Wed, 3 Sep 2014 17:02:48 +0000 (13:02 -0400)]
runtime: convert symtab.c into symtab.go

Because symtab.c was partially converted before,
the diffs are not terribly useful.

The earlier conversion was trying to refactor or
clean up the code in addition to doing the translation.
It also made a mistake by redefining Func to be something
users could overwrite.

I undid those changes, making symtab.go a more
literal line-for-line translation of symtab.c instead.

LGTM=josharian
R=golang-codereviews, dave, bradfitz, josharian
CC=golang-codereviews, iant, khr, r
https://golang.org/cl/140880043

10 years agoruntime: relax flaky GC pause test
Brad Fitzpatrick [Wed, 3 Sep 2014 16:54:53 +0000 (09:54 -0700)]
runtime: relax flaky GC pause test

We often saw GC pauses of 0 ns, not just on Windows.
Google Compute Engine timer granularity might suck
too.

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

10 years agoruntime: remove guard against uninitialized forcegc.g
Russ Cox [Wed, 3 Sep 2014 16:48:32 +0000 (12:48 -0400)]
runtime: remove guard against uninitialized forcegc.g

The race was in the old C code.
The new Go code does not have the race
and does not need the check.

LGTM=bradfitz, dvyukov
R=golang-codereviews, bradfitz, dvyukov
CC=golang-codereviews, rlh
https://golang.org/cl/140180043

10 years agoruntime: adopt race detector for runtime written in Go
Dmitriy Vyukov [Wed, 3 Sep 2014 16:47:30 +0000 (20:47 +0400)]
runtime: adopt race detector for runtime written in Go
Ignore memory access on g0/gsignal.
See the issue for context and explanation.
Fixes #8627.

LGTM=khr
R=golang-codereviews, mdempsky, khr
CC=golang-codereviews, rsc
https://golang.org/cl/137070043

10 years agoruntime: Start and stop individual goroutines at gc safepoints
Rick Hudson [Wed, 3 Sep 2014 16:06:36 +0000 (12:06 -0400)]
runtime: Start and stop individual goroutines at gc safepoints

Code to bring goroutines to a gc safepoint one at a time,
do some work such as scanning, and restart the
goroutine, and then move on to the next goroutine.
Currently this code does not do much useful work
but this infrastructure will be critical to future
concurrent GC work.

Fixed comments reviewers.

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

10 years agoruntime: deferproc/deferreturn in Go
Keith Randall [Wed, 3 Sep 2014 15:49:43 +0000 (08:49 -0700)]
runtime: deferproc/deferreturn in Go

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

10 years agocmd/cgo, runtime: write cgo stub wrappers in Go, not C
Russ Cox [Wed, 3 Sep 2014 15:36:14 +0000 (11:36 -0400)]
cmd/cgo, runtime: write cgo stub wrappers in Go, not C

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

10 years agoruntime: make onM and mcall take Go func values
Russ Cox [Wed, 3 Sep 2014 15:35:22 +0000 (11:35 -0400)]
runtime: make onM and mcall take Go func values

This gives them correct types in Go and also makes it
possible to use them to run Go code on an m stack.

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

10 years agoruntime: convert a few traceback-related functions from proc.c to traceback.go
Russ Cox [Wed, 3 Sep 2014 15:11:16 +0000 (11:11 -0400)]
runtime: convert a few traceback-related functions from proc.c to traceback.go

They were in proc.c mainly because there was no portable
traceback source file. As part of converting them to Go,
move to traceback.go.

In order to get access to the PC of _rt0_go,
rename to runtime.rt0_go.

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

10 years agoruntime: introduce, use funcPC to convert Go func to PC
Russ Cox [Wed, 3 Sep 2014 15:10:38 +0000 (11:10 -0400)]
runtime: introduce, use funcPC to convert Go func to PC

This removes the ** unsafe hack.

Real bug fixed at chan.go:101.

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

10 years agoruntime: increase windows prof thread priority sooner
Alex Brainman [Wed, 3 Sep 2014 04:17:04 +0000 (14:17 +1000)]
runtime: increase windows prof thread priority sooner

If system is busy burning cpu, it takes long time (about 300ms on
windows builders) to adjust prof thread priority. Once adjusted, prof
thread runs ahead of everyone else, but due to initial slowness, it
does not capture prof snapshots until start-up period is completed.

Change prof thread priority sooner, so it can start captures straight
away.

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/134360043

10 years agoruntime: avoid race with forcegc helper
Russ Cox [Tue, 2 Sep 2014 23:18:46 +0000 (19:18 -0400)]
runtime: avoid race with forcegc helper

While we are here, give the gc helper a real function name
that will appear in stack traces.

LGTM=rlh
R=rlh
CC=dvyukov, golang-codereviews
https://golang.org/cl/133470043

10 years agoruntime: don't allocate a new string in snprintf
David du Colombier [Tue, 2 Sep 2014 22:56:50 +0000 (00:56 +0200)]
runtime: don't allocate a new string in snprintf

This fixes the Plan 9 build.

Fix issue 8621.

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

10 years agoruntime: handle empty environment variables on Plan 9
David du Colombier [Tue, 2 Sep 2014 22:56:31 +0000 (00:56 +0200)]
runtime: handle empty environment variables on Plan 9

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

10 years agoruntime: unify fastrand1 and fastrand2
Keith Randall [Tue, 2 Sep 2014 21:33:33 +0000 (14:33 -0700)]
runtime: unify fastrand1 and fastrand2

C and Go calling conventions are now compatible, so we
don't need two versions of this function.

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

10 years agoruntime: convert select implementation to Go.
Keith Randall [Tue, 2 Sep 2014 21:13:29 +0000 (14:13 -0700)]
runtime: convert select implementation to Go.

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

10 years agocrypto: Add SHA3 functions in go.crypto/sha3 to the Hash enum.
David Leon Gil [Tue, 2 Sep 2014 19:23:49 +0000 (12:23 -0700)]
crypto: Add SHA3 functions in go.crypto/sha3 to the Hash enum.

Reverse dependency of https://golang.org/cl/130950043/

LGTM=agl
R=golang-codereviews, agl
CC=agl, golang-codereviews
https://golang.org/cl/138800043

10 years agoA+C: David Leon Gil (individual CLA)
Adam Langley [Tue, 2 Sep 2014 19:22:57 +0000 (12:22 -0700)]
A+C: David Leon Gil (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/134330043

10 years agoruntime: convert traceback*.c to Go
Russ Cox [Tue, 2 Sep 2014 19:12:53 +0000 (15:12 -0400)]
runtime: convert traceback*.c to Go

The two converted files were nearly identical.
Instead of continuing that duplication, I merged them
into a single traceback.go.

Tested on arm, amd64, amd64p32, and 386.

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

10 years agocmd/gc: fix runtime print(hex(x))
Russ Cox [Tue, 2 Sep 2014 18:36:25 +0000 (14:36 -0400)]
cmd/gc: fix runtime print(hex(x))

The code I wrote originally works for trivial functions
that are inlined at a call site in another package,
because that was how I wrote my local test.
Make hex(x) work for non-inlinable functions too.

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

10 years agoruntime: move reflect trampolines into thunk file.
Keith Randall [Tue, 2 Sep 2014 17:07:02 +0000 (10:07 -0700)]
runtime: move reflect trampolines into thunk file.

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

10 years agodatabase/sql: Avoid re-preparing statements when all connections are busy
Marko Tiikkaja [Tue, 2 Sep 2014 16:08:41 +0000 (09:08 -0700)]
database/sql: Avoid re-preparing statements when all connections are busy

Previously, if all connections were busy, we would always
re-prepare the statement on the connection we were assigned from
the pool.  That meant that if all connections were busy most of the
time, the number of prepared statements for each connection would
keep increasing over time.

Instead, after getting a free connection, check to see if the
statement has already been prepared on it, and reuse the statement
handle if so.

LGTM=bradfitz
R=golang-codereviews, gobot, bradfitz
CC=golang-codereviews
https://golang.org/cl/116930043

10 years agoruntime: convert clearpools/registerPoolCleanup to Go
Dmitriy Vyukov [Tue, 2 Sep 2014 16:03:48 +0000 (20:03 +0400)]
runtime: convert clearpools/registerPoolCleanup to Go

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

10 years agoruntime: convert cpuprof from C to Go
Matthew Dempsky [Tue, 2 Sep 2014 04:14:22 +0000 (00:14 -0400)]
runtime: convert cpuprof from C to Go

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

10 years agoruntime/pprof: adjust cpuHogger so that tests pass on windows builders
Alex Brainman [Tue, 2 Sep 2014 03:06:22 +0000 (23:06 -0400)]
runtime/pprof: adjust cpuHogger so that tests pass on windows builders

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

10 years agoruntime: fix gogetenv on Plan 9
David du Colombier [Tue, 2 Sep 2014 03:03:26 +0000 (23:03 -0400)]
runtime: fix gogetenv on Plan 9

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

10 years agoruntime: fix race detector running Go code on g0 of non-main thread
Russ Cox [Tue, 2 Sep 2014 01:55:57 +0000 (21:55 -0400)]
runtime: fix race detector running Go code on g0 of non-main thread

It looks like this has just always been broken:
the race detector handles running Go code on g0 of the main thread
and on g0 of any extra threads created by non-Go code, but it does
not handle running Go code on g0 of non-main threads created by Go.
Handle that.

Should fix the race build failures on the dashboard.

We're running into this now because we are running more
and more Go code on g0.

TBR=dvyukov
CC=golang-codereviews
https://golang.org/cl/137910043

10 years agotime: update generated zoneinfo_abbrs_windows.go
Alex Brainman [Tue, 2 Sep 2014 01:54:24 +0000 (11:54 +1000)]
time: update generated zoneinfo_abbrs_windows.go

The file in repo has been updated recently, but all these changes
are gone off the web site now. It seems web site gets updated once
in a while, so we'll update our file occasionally.

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

10 years agoruntime: fix Stack
Russ Cox [Mon, 1 Sep 2014 23:42:22 +0000 (19:42 -0400)]
runtime: fix Stack

Fixes #8626.

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

10 years agoruntime: convert mprof.goc to mprof.go
Russ Cox [Mon, 1 Sep 2014 22:51:12 +0000 (18:51 -0400)]
runtime: convert mprof.goc to mprof.go

The exported Go definitions appearing in mprof.go are
copied verbatim from debug.go.

The unexported Go funcs and types are new.
The C Bucket type used a union and was not a line-for-line translation.

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

10 years agoruntime: fix windows build
Russ Cox [Mon, 1 Sep 2014 21:36:45 +0000 (17:36 -0400)]
runtime: fix windows build

#ifdef'ed out code wasn't updated for argp change.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/139040043