]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agolog/syslog: fix race in test between channel close and accept.
Rémy Oudompheng [Thu, 28 Feb 2013 06:48:16 +0000 (07:48 +0100)]
log/syslog: fix race in test between channel close and accept.

Fixes #4769.

R=golang-dev, dave, adg, bradfitz
CC=fullung, golang-dev
https://golang.org/cl/7322089

12 years agoruntime: fix racefuncenter argument corruption.
Rémy Oudompheng [Thu, 28 Feb 2013 06:32:29 +0000 (07:32 +0100)]
runtime: fix racefuncenter argument corruption.

Revision 6a88e1893941 corrupts the argument to
racefuncenter by pushing the data block pointer
to the stack.

Fixes #4885.

R=dvyukov, rsc
CC=golang-dev
https://golang.org/cl/7381053

12 years agonet: pass tests on Plan 9
Akshat Kumar [Thu, 28 Feb 2013 06:18:02 +0000 (07:18 +0100)]
net: pass tests on Plan 9

Ignore problematic tests and un-ignore one
we can now pass.

R=rsc, rminnich, ality, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7396060

12 years agonet: fix slow network interface manipulations
Mikio Hara [Thu, 28 Feb 2013 05:58:41 +0000 (14:58 +0900)]
net: fix slow network interface manipulations

This CL reduces unnecessary network facility lookups introduced
by recent changes below.

changeset: 15798:53a4da6a4f4a
net: return correct point-to-point interface address on linux

changeset: 15799:a81ef8e0cc05
net: set up IPv6 scoped addressing zone for network facilities

Also adds a test case for issue 4839.

Benchmark results on linux/amd64, virtual machine:
benchmark                                 old ns/op    new ns/op    delta
BenchmarkInterfaces-2                         80487        80382   -0.13%
BenchmarkInterfaceByIndex-2                   72013        71391   -0.86%
BenchmarkInterfaceByName-2                    79865        80101   +0.30%
BenchmarkInterfaceAddrs-2                     42071       829677  +1872.09%
BenchmarkInterfacesAndAddrs-2                 35016       607622  +1635.27%
BenchmarkInterfacesAndMulticastAddrs-2       169849       169082   -0.45%
old: 15797:9c3930413c1b, new: tip

Benchmark results on linux/amd64, virtual machine:
benchmark                                 old ns/op    new ns/op    delta
BenchmarkInterfaces-2                         80487        81459   +1.21%
BenchmarkInterfaceByIndex-2                   72013        71512   -0.70%
BenchmarkInterfaceByName-2                    79865        80567   +0.88%
BenchmarkInterfaceAddrs-2                     42071       120108  +185.49%
BenchmarkInterfacesAndAddrs-2                 35016        33259   -5.02%
BenchmarkInterfacesAndMulticastAddrs-2       169849        82391  -51.49%
old: 15797:9c3930413c1b, new: tip+CL7400055

Benchmark results on darwin/amd64:
benchmark                                 old ns/op    new ns/op    delta
BenchmarkInterfaces-2                         34402        34231   -0.50%
BenchmarkInterfaceByIndex-2                   13192        12956   -1.79%
BenchmarkInterfaceByName-2                    34791        34388   -1.16%
BenchmarkInterfaceAddrs-2                     36565        63906  +74.77%
BenchmarkInterfacesAndAddrs-2                 17497        31068  +77.56%
BenchmarkInterfacesAndMulticastAddrs-2        25276        66711  +163.93%
old: 15797:9c3930413c1b, new: tip

Benchmark results on darwin/amd64:
benchmark                                 old ns/op    new ns/op    delta
BenchmarkInterfaces-2                         34402        31854   -7.41%
BenchmarkInterfaceByIndex-2                   13192        12950   -1.83%
BenchmarkInterfaceByName-2                    34791        31926   -8.23%
BenchmarkInterfaceAddrs-2                     36565        42144  +15.26%
BenchmarkInterfacesAndAddrs-2                 17497        17329   -0.96%
BenchmarkInterfacesAndMulticastAddrs-2        25276        24870   -1.61%
old: 15797:9c3930413c1b, new: tip+CL7400055

Update #4234.
Fixes #4839 (again).
Fixes #4866.

R=golang-dev, fullung
CC=golang-dev
https://golang.org/cl/7400055

12 years agonet, os, syscall: Plan 9: adjust error handling
Akshat Kumar [Thu, 28 Feb 2013 05:43:21 +0000 (06:43 +0100)]
net, os, syscall: Plan 9: adjust error handling

syscall: Use NewError for all system errors and introduce
        some new errors for compatibility with other packages
        and proper error handling in net. Also introduce
        Temporary and Timeout methods on ErrorString.

net: Make errors from dial, accept, listen functions follow the
        OpError standard and discern whether the underlying
        error came from syscall. Since Plan 9 uses a correspondence
        between file and network operations, all system error
        reporting happens through the underlying file operation.
        In Go code, we go through package os for file operations,
        so there is another level of indirection in error types.
        This change allows us to compare the errors with those in
        package syscall, when appropriate.

os: Just use the error string already present in package os,
        instead of calling out to package syscall.

R=rsc, ality, rminnich, bradfitz
CC=golang-dev
https://golang.org/cl/7398054

12 years agosyscall: Plan 9: keep a consistent environment array
Akshat Kumar [Thu, 28 Feb 2013 05:39:02 +0000 (06:39 +0100)]
syscall: Plan 9: keep a consistent environment array

Map order is non-deterministic. Introduce a new
environment string array that tracks the env map.
This allows us to produce identical results for
Environ() upon successive calls, as expected by the
TestConsistentEnviron test in package os.

R=rsc, ality, rminnich, bradfitz, r
CC=golang-dev
https://golang.org/cl/7411047

12 years agomisc/dist: handle previous installation
Tyler Bunnell [Thu, 28 Feb 2013 05:09:48 +0000 (16:09 +1100)]
misc/dist: handle previous installation

The installer package will now detect a previous installation and warn the user
that the previous installation will be deleted. If the user continues, the
installer will delete the previous installation and install the package as
usual.

Fixes #4293.

R=adg
CC=golang-dev
https://golang.org/cl/7427044

12 years agoA+C: Tyler Bunnell (individual CLA)
Andrew Gerrand [Thu, 28 Feb 2013 05:09:32 +0000 (16:09 +1100)]
A+C: Tyler Bunnell (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/7432043

12 years agocmd/cgo: add implementation comment
Russ Cox [Thu, 28 Feb 2013 04:55:01 +0000 (20:55 -0800)]
cmd/cgo: add implementation comment

R=golang-dev, r, bradfitz, iant
CC=golang-dev
https://golang.org/cl/7407050

12 years agoexp/cookiejar: eliminate some "."+str garbage.
Nigel Tao [Thu, 28 Feb 2013 02:46:26 +0000 (13:46 +1100)]
exp/cookiejar: eliminate some "."+str garbage.

It's not a big deal, but it's easy to fix.

R=dsymonds
CC=dr.volker.dobler, golang-dev
https://golang.org/cl/7425043

12 years agoexp/cookiejar: add some more tests
Volker Dobler [Thu, 28 Feb 2013 00:18:39 +0000 (11:18 +1100)]
exp/cookiejar: add some more tests

New tests added for port handling and IDNA domains.
A new test case contains several redundant
tests but provides a nice documentation of the
implemented rules for domain handling.

R=nigeltao
CC=golang-dev
https://golang.org/cl/7393070

12 years agonet/http: don't drop error on request write
Gustavo Niemeyer [Thu, 28 Feb 2013 00:15:36 +0000 (21:15 -0300)]
net/http: don't drop error on request write

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7230059

12 years agobuiltin: document appending a string to a byte slice
Rob Pike [Thu, 28 Feb 2013 00:11:17 +0000 (16:11 -0800)]
builtin: document appending a string to a byte slice
Fixes #4873.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7421043

12 years agosyscall: add MSG_FASTOPEN to Linux
Brad Fitzpatrick [Wed, 27 Feb 2013 23:51:51 +0000 (15:51 -0800)]
syscall: add MSG_FASTOPEN to Linux

Update #4842

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7369060

12 years agocmd/vet: continue past first error
Rob Pike [Wed, 27 Feb 2013 23:43:33 +0000 (15:43 -0800)]
cmd/vet: continue past first error
Also delete bogus tests for f.pkg (does the file have a package) since all
files have a package attached. The tests for pkg.types and pkg.values
suffice.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7418043

12 years agomisc/osx: remove legacy packaging scripts
Andrew Gerrand [Wed, 27 Feb 2013 23:39:09 +0000 (10:39 +1100)]
misc/osx: remove legacy packaging scripts

These are superseded by the tool at misc/dist.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7420044

12 years agogo/types: don't crash if there are no hints
Robert Griesemer [Wed, 27 Feb 2013 23:22:14 +0000 (15:22 -0800)]
go/types: don't crash if there are no hints

R=r
CC=golang-dev
https://golang.org/cl/7375060

12 years agonet/http: add Transport.CancelRequest
Brad Fitzpatrick [Wed, 27 Feb 2013 23:20:13 +0000 (15:20 -0800)]
net/http: add Transport.CancelRequest

Permits all sorts of custom HTTP timeout policies without
adding a new Transport timeout Duration for each combination
of HTTP phases.

This keeps track internally of which TCP connection a given
Request is on, and lets callers forcefully close the TCP
connection for a given request, without actually getting
the net.Conn directly.

Additionally, a future CL will implement res.Body.Close (Issue
3672) in terms of this.

Update #3362
Update #3672

R=golang-dev, rsc, adg
CC=golang-dev
https://golang.org/cl/7372054

12 years agoapi: update next.txt
Brad Fitzpatrick [Wed, 27 Feb 2013 23:19:59 +0000 (15:19 -0800)]
api: update next.txt

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7420043

12 years agodoc/effective_go.html: use correct name in Interface Checks section
Rob Pike [Wed, 27 Feb 2013 22:42:53 +0000 (14:42 -0800)]
doc/effective_go.html: use correct name in Interface Checks section
Fixes #4897.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7377061

12 years agogo/types: don't crash when assigning to undefined variables
Robert Griesemer [Wed, 27 Feb 2013 22:24:41 +0000 (14:24 -0800)]
go/types: don't crash when assigning to undefined variables

R=adonovan
CC=golang-dev
https://golang.org/cl/7369059

12 years agoexp/ssa: fix *bsd breakage.
Alan Donovan [Wed, 27 Feb 2013 22:00:02 +0000 (17:00 -0500)]
exp/ssa: fix *bsd breakage.

Use portable ReadDirent, not linux Getdents.

R=gri
TBR=gri
CC=golang-dev
https://golang.org/cl/7405051

12 years agoexp/ssa: a number of bug fixes.
Alan Donovan [Wed, 27 Feb 2013 21:43:16 +0000 (16:43 -0500)]
exp/ssa: a number of bug fixes.

ssadump:
- permit naming a package (not just *.go files) on command line.
- set BuildSerially flag when setting Log* flags
  (Q. should instead the logging functions take a lock?)

Builder:
- fixed bug when calling variadic function with zero '...'-params.
  Added regression test.

interp:
- more external functions:
   the 'error' interface
   bytes.{Equal,IndexByte}
   reflect.(Value).{Bool,NumOut,Out}
   syscall.{Close,Fstat,Read,Open,Stat,Lstat,Fstat,
     Getdents,ParseDirents,Getwd}
- permit comparisons between *Function and *closure.

With this CL, ssadump can now interpret ssadump itself (!),
loading, parsing, typing, SSA-building, and running
println("Hello, World!").  While a fmt-based equivalent still
lacks some external routines, e.g. math/big, I think there are
diminishing returns in expanding the interpreter (and
debugging it is starting to feel like "Inception").

I'm pretty confident this package is now good enough for wider use.

R=gri
CC=golang-dev
https://golang.org/cl/7392053

12 years agonet: fix windows build
Brad Fitzpatrick [Wed, 27 Feb 2013 20:42:26 +0000 (12:42 -0800)]
net: fix windows build

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7392054

12 years agonet: add DialOpt, the extensible Dial w/ options dialer
Brad Fitzpatrick [Wed, 27 Feb 2013 19:59:36 +0000 (11:59 -0800)]
net: add DialOpt, the extensible Dial w/ options dialer

Add DialOpt. So we have:

func Dial(net, addr string) (Conn, error)
func DialTimeout(net, addr string, timeout time.Duration) (Conn, error)
func DialOpt(addr string, opts ...DialOption) (Conn, error)

DialTimeout (and Dial) are regrettable in retrospect. Maybe
in a future Go we'll be back down to one Dial, with DialOpt
becoming Dial.

DialOpt looks like:

c, err := net.DialOpt("google.com:80")  // tcp is default
c, err := net.DialOpt("google.com:80", net.Timeout(30 * time.Second))
c, err := net.DialOpt("google.com:80", net.TCPFastOpen())
c, err := net.DialOpt("google.com:80", net.LocalAddr(..))
c, err := net.DialOpt("google.com:53", net.Network("udp6"))

And then: (clustered in godoc)

type DialOption interface { /* private only */ }
  func Deadline(time.Time) DialOption
  func LocalAddr(Addr) DialOption
  func Network(string) DialOption
  func TCPFastOpen() DialOption
  func Timeout(time.Duration) DialOption

I'm pretty confident we could add Happy Eyeballs to this too.

Fixes #3097
Update #3610
Update #4842

R=golang-dev, r, dave, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/7365049

12 years agoruntime: more changes in preparation to the new scheduler
Dmitriy Vyukov [Wed, 27 Feb 2013 19:17:53 +0000 (21:17 +0200)]
runtime: more changes in preparation to the new scheduler
add per-P cache of dead G's
add global runnable queue (not used for now)
add list of idle P's (not used for now)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7397061

12 years agocmd/gc: don't emit type instructions for nonexisting locals
Daniel Morsing [Wed, 27 Feb 2013 18:47:14 +0000 (19:47 +0100)]
cmd/gc: don't emit type instructions for nonexisting locals

If all locals are optimized away, the type instructions would stay in the instruction stream. Call fixautoused to scrub the output.

Fixes #4915.

R=rsc
CC=golang-dev
https://golang.org/cl/7385055

12 years agosort: use proper mass unit in example
Volker Dobler [Wed, 27 Feb 2013 18:44:50 +0000 (10:44 -0800)]
sort: use proper mass unit in example

The values for the planet masses are given in
earth mass, not solar mass.

R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/7368054

12 years agonet/http: add Transport.ResponseHeaderTimeout
Brad Fitzpatrick [Wed, 27 Feb 2013 16:47:08 +0000 (08:47 -0800)]
net/http: add Transport.ResponseHeaderTimeout

Update #3362

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/7369055

12 years agoexp/ssa: resolve botched merge.
Alan Donovan [Wed, 27 Feb 2013 16:39:39 +0000 (11:39 -0500)]
exp/ssa: resolve botched merge.

While submitting CL 7371051 I accidentally reverted much of CL
7395052.  This change restores it.

R=gri
TBR=gri
CC=golang-dev
https://golang.org/cl/7364051

12 years agoruntime: improve precision of GC_REGION
Jan Ziak [Wed, 27 Feb 2013 16:28:53 +0000 (08:28 -0800)]
runtime: improve precision of GC_REGION

R=rsc
CC=golang-dev
https://golang.org/cl/7383054

12 years agoexp/ssa: make invokation of deferred procedure calls explicit.
Alan Donovan [Wed, 27 Feb 2013 15:35:23 +0000 (10:35 -0500)]
exp/ssa: make invokation of deferred procedure calls explicit.

The correct semantics of named result parameters and deferred
procedures cannot be implemented with the existing Ret
instruction alone, since the required sequence is:
(1) evaluate return operands and parallel-assign them to
    named result parameters
(2) invoke deferred procedures
(3) load named result parameters to form result tuple.

We introduce a new 'rundefers' instruction that explicitly
invokes the deferred procedure calls, and we generate code
that follows the sequence above.

Most functions do not use deferred procedures but this cannot
be known in a single pass.  So, we add an optimisation to
eliminate redundant 'rundefers'; it is piggybacked on the
existing pass done for "lifting".

Added tests.

R=gri
CC=golang-dev
https://golang.org/cl/7411043

12 years agoexp/ssa: perform all packages' BUILD phases in parallel.
Alan Donovan [Wed, 27 Feb 2013 15:26:24 +0000 (10:26 -0500)]
exp/ssa: perform all packages' BUILD phases in parallel.

Details:
- move Builder.nTo1Vars into package => thread-safe.
- add BuildSerially builder mode flag to disable concurrency.
- add Builder.BuildAllPackages method.

Benchmark: BuildAllPackages for $GOROOT/test/append.go drops
to 83ms from 190ms (GOMAXPROCS=8).

R=gri
CC=golang-dev
https://golang.org/cl/7371051

12 years agoexp/locale/collate: fixed go vet error.
Marcel van Lohuizen [Wed, 27 Feb 2013 13:09:42 +0000 (14:09 +0100)]
exp/locale/collate: fixed go vet error.

R=r, dave
CC=golang-dev
https://golang.org/cl/7403055

12 years agoexp/locale/collate: several changes based on comments on CL 7060051
Marcel van Lohuizen [Wed, 27 Feb 2013 10:08:18 +0000 (11:08 +0100)]
exp/locale/collate: several changes based on comments on CL 7060051
which was submitted earlier.

R=r
CC=golang-dev
https://golang.org/cl/7402048

12 years agosyscall: Fix FD passing on OpenBSD
Matthew Dempsky [Wed, 27 Feb 2013 04:19:23 +0000 (15:19 +1100)]
syscall: Fix FD passing on OpenBSD

Fixes #3349.

R=bradfitz, dave, minux.ma
CC=golang-dev
https://golang.org/cl/7383056

12 years agolibmach: fix build (set and not used)
Russ Cox [Wed, 27 Feb 2013 03:51:47 +0000 (22:51 -0500)]
libmach: fix build (set and not used)

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/7401053

12 years agocmd/ld: change GC_CALL to 32-bit relative address
Russ Cox [Wed, 27 Feb 2013 03:42:56 +0000 (19:42 -0800)]
cmd/ld: change GC_CALL to 32-bit relative address

The current code uses 64-bit pc-relative on 64-bit systems,
but in ELF linkers there is no such thing, so we cannot
express this in a .o file. Change to 32-bit.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7383055

12 years agocmd/ld, runtime: adjust symbol table representation
Russ Cox [Wed, 27 Feb 2013 03:38:14 +0000 (22:38 -0500)]
cmd/ld, runtime: adjust symbol table representation

This CL changes the encoding used for the Go symbol table,
stored in the binary and used at run time. It does not change
any of the semantics or structure: the bits are just packed
a little differently.

The comment at the top of runtime/symtab.c describes the new format.

Compared to the Go 1.0 format, the main changes are:

* Store symbol addresses as full-pointer-sized host-endian values.
  (For 6g, this means addresses are 64-bit little-endian.)

* Store other values (frame sizes and so on) varint-encoded.

The second change more than compensates for the first:
for the godoc binary on OS X/amd64, the new symbol table
is 8% smaller than the old symbol table (1,425,668 down from 1,546,276).

This is a required step for allowing the host linker (gcc) to write
the final Go binary, since it will have to fill in the symbol address slots
(so the slots must be host-endian) and on 64-bit systems it may
choose addresses above 4 GB.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7403054

12 years agoexp/cookiejar: add a test for canonicalHost errors.
Nigel Tao [Wed, 27 Feb 2013 02:05:57 +0000 (13:05 +1100)]
exp/cookiejar: add a test for canonicalHost errors.

R=dr.volker.dobler
CC=golang-dev
https://golang.org/cl/7389048

12 years agosort: add an example showing sorting struct by different keys
Rob Pike [Wed, 27 Feb 2013 01:17:44 +0000 (17:17 -0800)]
sort: add an example showing sorting struct by different keys

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/7376058

12 years agonet/http: fix a bunch of test leaks
Brad Fitzpatrick [Wed, 27 Feb 2013 01:12:50 +0000 (17:12 -0800)]
net/http: fix a bunch of test leaks

And one real leak in TimeoutHandler.

Fixes #4821

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7369056

12 years agogo/types: be more robust in presence of multiple errors
Robert Griesemer [Tue, 26 Feb 2013 22:33:24 +0000 (14:33 -0800)]
go/types: be more robust in presence of multiple errors

- better documentation of Check
- better handling of (explicit) internal panics
- gotype: don't stop after 1st error

R=adonovan, r
CC=golang-dev
https://golang.org/cl/7406052

12 years agosyscall: fix FD passing on FreeBSD and NetBSD
Dave Cheney [Tue, 26 Feb 2013 22:13:15 +0000 (09:13 +1100)]
syscall: fix FD passing on FreeBSD and NetBSD

Fixes #3348.

R=devon.odell, minux.ma, bradfitz, mdempsky
CC=golang-dev
https://golang.org/cl/7406050

12 years agoexp/ssa: support multiple labels on same statement.
Alan Donovan [Tue, 26 Feb 2013 19:07:03 +0000 (14:07 -0500)]
exp/ssa: support multiple labels on same statement.

Actually it already worked since the spec only requires that
the one immediately preceding a for/switch/... be usable as
the target of a break or continue statement.

Added a test.
Also: allocate Function.lblocks on first use.

R=gri
CC=golang-dev
https://golang.org/cl/7365058

12 years agomisc/emacs: Greatly improve go-mode for Emacs.
Dominik Honnef [Tue, 26 Feb 2013 18:48:32 +0000 (13:48 -0500)]
misc/emacs: Greatly improve go-mode for Emacs.

The original go-mode is plagued with odd behaviour, lack of
behaviour typical to modes in Emacs and bugs.

This change rewrites great parts of go-mode (basically only
keeping the gofmt and godoc functions).

Additionally it adds new features such as manipulating package
imports.

For more information please see
https://groups.google.com/group/golang-nuts/browse_frm/thread/3a9d6dae3369c0b5/1efe65e2f7afb190

Fixes #3618.
Fixes #4240.
Fixes #4322.
Fixes #4671.
Fixes #4726.

R=golang-dev, fullung, sameer, cw, arthur, proppy, adonovan, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7314113

12 years agocmd/vet: fix printf test for unsafe Pointer
Rob Pike [Tue, 26 Feb 2013 18:36:13 +0000 (10:36 -0800)]
cmd/vet: fix printf test for unsafe Pointer
And fix test. Pointer to unsafe.Pointer tests nothing important...
Also identify the incorrect type: go/types.Type is a Stringer.

Also fix a couple of incorrect format verbs found by new printf checker,
now that we can run it on more files.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7385051

12 years agoexp/ssa: reimplement logic for field selection.
Alan Donovan [Tue, 26 Feb 2013 18:32:22 +0000 (13:32 -0500)]
exp/ssa: reimplement logic for field selection.

The previous approach desugared the ast.SelectorExpr
to make implicit field selections explicit.  But:
1) it was clunky since it required allocating temporary
   syntax trees.
2) it was not thread-safe since it required poking
   types into the shared type map for the new ASTs.
3) the desugared syntax had no place to represent the
   package lexically enclosing each implicit field
   selection, so it was as if they all occurred in the
   same package as the explicit field selection.
   This meant unexported field names changed meaning.

This CL does what I should have done all along: just
generate the SSA instructions directly from the original
AST and the promoted field information.

Also:
- add logStack util for paired start/end log messages.
  Useful for debugging crashes.

R=gri
CC=golang-dev
https://golang.org/cl/7395052

12 years agoA+C: Dominik Honnef (individual CLA)
Brad Fitzpatrick [Tue, 26 Feb 2013 18:27:02 +0000 (10:27 -0800)]
A+C: Dominik Honnef (individual CLA)

Generated by addca (mostly, until codereview
blew up)

R=golang-dev
CC=golang-dev
https://golang.org/cl/7386054

12 years agoruntime: fix stack cache typos
Anthony Martin [Tue, 26 Feb 2013 17:59:17 +0000 (09:59 -0800)]
runtime: fix stack cache typos

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7370050

12 years agoall: clean up C function prototypes
Anthony Martin [Tue, 26 Feb 2013 17:51:33 +0000 (09:51 -0800)]
all: clean up C function prototypes

R=minux.ma, rsc, akumar, bradfitz
CC=golang-dev
https://golang.org/cl/7313070

12 years agoos/exec: Pass tests on Plan 9
Akshat Kumar [Tue, 26 Feb 2013 17:40:55 +0000 (09:40 -0800)]
os/exec: Pass tests on Plan 9

Adjust the exit status string for Plan 9.

Upon allocating >100 file descriptors, Plan 9
raises a warning. Moreover, the Go runtime for
32-bit version of Plan 9 keeps /dev/bintime
open for its implementation of runtime.nanotime().
This change accounts for these things in
TestExtraFiles.

R=rsc, rminnich, ality, bradfitz
CC=golang-dev
https://golang.org/cl/7363056

12 years agobuild: do not set GOBIN on Plan 9
Anthony Martin [Tue, 26 Feb 2013 17:25:46 +0000 (09:25 -0800)]
build: do not set GOBIN on Plan 9

Also, I synced the rc files with changes
that have been made to make.bash, etc.

R=seed, rminnich, r
CC=golang-dev
https://golang.org/cl/7389049

12 years agocmd/go: do not print GCC environment variables on Plan 9
Anthony Martin [Tue, 26 Feb 2013 16:34:47 +0000 (08:34 -0800)]
cmd/go: do not print GCC environment variables on Plan 9

R=seed, rminnich, r, minux.ma
CC=golang-dev
https://golang.org/cl/7397059

12 years agogo/types: fix sizeof computations
Robert Griesemer [Tue, 26 Feb 2013 06:06:58 +0000 (22:06 -0800)]
go/types: fix sizeof computations

Context.Alignof/Offsetsof/Sizeof now provide means
to customize the type checker for a given platform.

- provide Context.Offsetsof to specify the
  offsets of struct fields
- use the correct sizes for ints, uint, uintptrs
  in constant computations
- moved all size computations into separate file
  (sizes.go)
- fixed a bug with string constant slicing

R=adonovan, axwalk
CC=golang-dev
https://golang.org/cl/7363054

12 years agogo/types: more robust imports
Robert Griesemer [Tue, 26 Feb 2013 04:43:35 +0000 (20:43 -0800)]
go/types: more robust imports

- imported objects don't have position information
- gc exported data contains non-exported objects at
  the top-level, guard against them
- better error message when dot-imports conflict
  with local declarations

R=adonovan, r
CC=golang-dev
https://golang.org/cl/7379052

12 years agogo/types: embedded fields can be predeclared types
Robert Griesemer [Tue, 26 Feb 2013 04:42:29 +0000 (20:42 -0800)]
go/types: embedded fields can be predeclared types

R=adonovan, r
CC=golang-dev
https://golang.org/cl/7376055

12 years agocmd/godoc: add support for display Notes parsed by pkg/go/doc
Cosmos Nicolaou [Tue, 26 Feb 2013 04:34:09 +0000 (20:34 -0800)]
cmd/godoc: add support for display Notes parsed by pkg/go/doc
pkg/go/doc: move BUG notes from Package.Bugs to the general Package.Notes field.
Removing .Bugs would break existing code so it's left in for now.

R=gri, gri, gary.burd, dsymonds, rsc, kevlar
CC=golang-dev
https://golang.org/cl/7341053

12 years agoos: use windows ReadConsole to read from console
Alex Brainman [Tue, 26 Feb 2013 03:18:48 +0000 (14:18 +1100)]
os: use windows ReadConsole to read from console

Fixes #4760.

R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/7312053

12 years agosyscall, runtime: Plan 9: use nanotime syscall on amd64
Akshat Kumar [Tue, 26 Feb 2013 00:56:08 +0000 (01:56 +0100)]
syscall, runtime: Plan 9: use nanotime syscall on amd64

Separates the implementation of nanotime on 64-bit
version of Plan 9 from that on the 32-bit version.
The former uses a syscall.

R=rsc, rminnich, ality
CC=golang-dev
https://golang.org/cl/7379051

12 years agoexp/cookiejar: implement IDNA/Punycode's toASCII.
Nigel Tao [Tue, 26 Feb 2013 00:55:41 +0000 (11:55 +1100)]
exp/cookiejar: implement IDNA/Punycode's toASCII.

R=dr.volker.dobler
CC=golang-dev
https://golang.org/cl/7398049

12 years agocmd/vet: silence error from type checker unless verbose is set.
Rob Pike [Tue, 26 Feb 2013 00:29:09 +0000 (16:29 -0800)]
cmd/vet: silence error from type checker unless verbose is set.
Also restores the checking of _test.go files, which disappeared
as a result of the package-at-a-time change.
Fixes #4895.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7399051

12 years agonet: Implement FileListener, FileConn, and File methods for Plan 9
Akshat Kumar [Tue, 26 Feb 2013 00:26:40 +0000 (01:26 +0100)]
net: Implement FileListener, FileConn, and File methods for Plan 9

Functions for representing network connections as files
and vice versa, on Plan 9.

Representing network connections as files is not so
straight-forward, because a network connection on Plan 9
is represented by a host of files rather than a single
file descriptor (as is the case on UNIX). We use the
type system to distinguish between listeners and
connections, returning the control file in the former
case and the data file in the latter case.

R=rsc, rminnich, ality, akumar, bradfitz
CC=golang-dev
https://golang.org/cl/7235068

12 years agocmd/vet: move the tests into separate files
Rob Pike [Tue, 26 Feb 2013 00:25:34 +0000 (16:25 -0800)]
cmd/vet: move the tests into separate files
Then mark them with a build tag so they're not compiled into the binary.
They are called test_*.go rather than *_test.go because they are not
for go test. Use make test to test the command.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7377052

12 years agocmd/gc: accept cases with same value but different types in switch.
Rémy Oudompheng [Mon, 25 Feb 2013 23:45:43 +0000 (00:45 +0100)]
cmd/gc: accept cases with same value but different types in switch.

Fixes #4781.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7365056

12 years agocmd/gc: fix corruption in export of &T{} literals.
Rémy Oudompheng [Mon, 25 Feb 2013 23:43:31 +0000 (00:43 +0100)]
cmd/gc: fix corruption in export of &T{} literals.

Composite literals using the &T{} form were incorrectly
exported, leading to weird errors at import time.

Fixes #4879.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7395054

12 years agocmd/gc: apply escape analysis results to closures.
Rémy Oudompheng [Mon, 25 Feb 2013 23:40:28 +0000 (00:40 +0100)]
cmd/gc: apply escape analysis results to closures.

This avoids an allocation when closures are used
as "macros", in Walk idioms, or as argument to defer.

benchmark                old ns/op    new ns/op    delta
BenchmarkSearchWrappers       1171          354  -69.77%
BenchmarkCallClosure             3            3  -12.54%
BenchmarkCallClosure1          119            7  -93.95%
BenchmarkCallClosure2          183           74  -59.18%
BenchmarkCallClosure3          187           75  -59.57%
BenchmarkCallClosure4          187           76  -58.98%

Compared to Go 1:
benchmark                  old ns/op    new ns/op    delta
BenchmarkSearchWrappers         3208          354  -88.97%

Fixes #3520.

R=daniel.morsing, bradfitz, minux.ma, dave, rsc
CC=golang-dev
https://golang.org/cl/7397056

12 years agostrconv, fmt: clarify behavior of CanBackquote and "%#q".
Shenghou Ma [Mon, 25 Feb 2013 22:33:59 +0000 (06:33 +0800)]
strconv, fmt: clarify behavior of CanBackquote and "%#q".
Fixes #4858.

R=golang-dev, bradfitz, r, rsc
CC=golang-dev
https://golang.org/cl/7387044

12 years agotime: handle very large sleep durations
Andrew Gerrand [Mon, 25 Feb 2013 22:23:58 +0000 (09:23 +1100)]
time: handle very large sleep durations

Fixes #4903.

R=golang-dev, daniel.morsing, dave, r
CC=golang-dev
https://golang.org/cl/7388056

12 years agodoc: document that weekly.html is only a historical reference
Andrew Gerrand [Mon, 25 Feb 2013 22:23:34 +0000 (09:23 +1100)]
doc: document that weekly.html is only a historical reference

Fixes #4810.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7401050

12 years agolibmach, cmd/5a, cmd/5c, cmd/5g, cmd/5l: enable DWARF type info for Linux/ARM
Shenghou Ma [Mon, 25 Feb 2013 22:15:29 +0000 (06:15 +0800)]
libmach, cmd/5a, cmd/5c, cmd/5g, cmd/5l: enable DWARF type info for Linux/ARM
Fixes #3747.

Update #4912
This CL adds gotype into .5 object file.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7376054

12 years agosyscall: Plan9, amd64: fix syscall error handling in assembly
Akshat Kumar [Mon, 25 Feb 2013 21:40:14 +0000 (22:40 +0100)]
syscall: Plan9, amd64: fix syscall error handling in assembly

Syscalls return `-1' on error and the representation is always
32-bits. The `$-1' literal in 64-bit assembly is always the
64-bit representation. So this change makes sure that we
always do a 32-bit comparison when checking for error.
Also makes sure that in the error case, we return a 64-bit
`-1' from runtime.seek.

Fixes the arithmetic for handling the error-string in
runtime.Syscall6.

R=golang-dev, rminnich, rsc, ality, minux.ma
CC=golang-dev
https://golang.org/cl/7399052

12 years agoruntime/cgo: fix deadlock involving signals on darwin
Dmitriy Vyukov [Mon, 25 Feb 2013 21:36:29 +0000 (16:36 -0500)]
runtime/cgo: fix deadlock involving signals on darwin
sigprocmask() is process-wide on darwin, so two concurrent
libcgo_sys_thread_start() can result in all signals permanently
blocked, which in particular blocks handling of nil derefs.
Fixes #4833.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/7324058

12 years agodoc: fix wiki codelab description of template parsing
Andrew Gerrand [Mon, 25 Feb 2013 21:31:47 +0000 (08:31 +1100)]
doc: fix wiki codelab description of template parsing

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7372048

12 years agonet/http/cgi: make tests compile on plan9
Brad Fitzpatrick [Mon, 25 Feb 2013 21:27:15 +0000 (13:27 -0800)]
net/http/cgi: make tests compile on plan9

Don't reference the non-portable syscall.Signal(0).

Maybe they'll pass too. Untested. plan9 bit from
Akshat Kumar.

R=golang-dev, akumar
CC=golang-dev
https://golang.org/cl/7370049

12 years agocmd/gc: can stop tracking gotype in regopt
Russ Cox [Mon, 25 Feb 2013 21:11:34 +0000 (16:11 -0500)]
cmd/gc: can stop tracking gotype in regopt

Now that the type information is in TYPE instructions
that are not rewritten by the optimization passes,
we don't have to try to preserve the type information
(no longer) attached to MOV instructions.

R=ken2
CC=golang-dev
https://golang.org/cl/7402054

12 years agoruntime: precise garbage collection of channels
Jan Ziak [Mon, 25 Feb 2013 20:58:23 +0000 (15:58 -0500)]
runtime: precise garbage collection of channels

This changeset adds a mostly-precise garbage collection of channels.
The garbage collection support code in the linker isn't recognizing
channel types yet.

Fixes issue http://stackoverflow.com/questions/14712586/memory-consumption-skyrocket

R=dvyukov, rsc, bradfitz
CC=dave, golang-dev, minux.ma, remyoudompheng
https://golang.org/cl/7307086

12 years agoall: fix some vet-found printf errors
Rob Pike [Mon, 25 Feb 2013 20:43:03 +0000 (12:43 -0800)]
all: fix some vet-found printf errors

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7393059

12 years agocmd/gc: fix mkbuiltin (gc -A always write all symbols to export section)
Shenghou Ma [Mon, 25 Feb 2013 19:14:59 +0000 (03:14 +0800)]
cmd/gc: fix mkbuiltin (gc -A always write all symbols to export section)
Regenerate cmd/gc/builtin.c.
Fixes #4908.

R=rsc
CC=golang-dev
https://golang.org/cl/7383053

12 years agocmd/go: fix vet
Francisco Souza [Mon, 25 Feb 2013 18:43:04 +0000 (10:43 -0800)]
cmd/go: fix vet

Now that vet does typechecking, it should use only pkg.gofiles, instead
of pkg.allgofiles. Ignored files should not be checked by vet, because
they wouldn't typecheck.

Fixes #4906.

R=rsc, r
CC=golang-dev
https://golang.org/cl/7401051

12 years agocmd/5g: fix arm build
Russ Cox [Mon, 25 Feb 2013 17:21:12 +0000 (12:21 -0500)]
cmd/5g: fix arm build

R=ken2
CC=golang-dev
https://golang.org/cl/7365057

12 years agocmd/gc: emit explicit type information for local variables
Russ Cox [Mon, 25 Feb 2013 17:13:47 +0000 (12:13 -0500)]
cmd/gc: emit explicit type information for local variables

The type information is (and for years has been) included
as an extra field in the address chunk of an instruction.
Unfortunately, suppose there is a string at a+24(FP) and
we have an instruction reading its length. It will say:

        MOVQ x+32(FP), AX

and the type of *that* argument is int (not slice), because
it is the length being read. This confuses the picture seen
by debuggers and now, worse, by the garbage collector.

Instead of attaching the type information to all uses,
emit an explicit list of TYPE instructions with the information.
The TYPE instructions are no-ops whose only role is to
provide an address to attach type information to.

For example, this function:

        func f(x, y, z int) (a, b string) {
                return
        }

now compiles into:

        --- prog list "f" ---
        0000 (/Users/rsc/x.go:3) TEXT    f+0(SB),$0-56
        0001 (/Users/rsc/x.go:3) LOCALS  ,
        0002 (/Users/rsc/x.go:3) TYPE    x+0(FP){int},$8
        0003 (/Users/rsc/x.go:3) TYPE    y+8(FP){int},$8
        0004 (/Users/rsc/x.go:3) TYPE    z+16(FP){int},$8
        0005 (/Users/rsc/x.go:3) TYPE    a+24(FP){string},$16
        0006 (/Users/rsc/x.go:3) TYPE    b+40(FP){string},$16
        0007 (/Users/rsc/x.go:3) MOVQ    $0,b+40(FP)
        0008 (/Users/rsc/x.go:3) MOVQ    $0,b+48(FP)
        0009 (/Users/rsc/x.go:3) MOVQ    $0,a+24(FP)
        0010 (/Users/rsc/x.go:3) MOVQ    $0,a+32(FP)
        0011 (/Users/rsc/x.go:4) RET     ,

The { } show the formerly hidden type information.
The { } syntax is used when printing from within the gc compiler.
It is not accepted by the assemblers.

The same type information is now included on global variables:

0055 (/Users/rsc/x.go:15) GLOBL   slice+0(SB){[]string},$24(AL*0)

This more accurate type information fixes a bug in the
garbage collector's precise heap collection.

The linker only cares about globals right now, but having the
local information should make things a little nicer for Carl
in the future.

Fixes #4907.

R=ken2
CC=golang-dev
https://golang.org/cl/7395056

12 years agogo/parser: more precise comment
Robert Griesemer [Mon, 25 Feb 2013 16:29:46 +0000 (08:29 -0800)]
go/parser: more precise comment

See also CL 7383051 for details.

R=adonovan, bradfitz
CC=golang-dev
https://golang.org/cl/7378063

12 years agonet/rpc: avoid racy use of closing flag.
Roger Peppe [Mon, 25 Feb 2013 16:22:00 +0000 (16:22 +0000)]
net/rpc: avoid racy use of closing flag.

It's accessed without mutex protection
in a different goroutine from the one that
sets it.

Also make sure that Client.Call after Client.Close
will reliably return ErrShutdown, and that clients
see ErrShutdown rather than io.EOF when appropriate.

Suggestions welcome for a way to reliably test
the mutex issue.

R=r, iant
CC=golang-dev
https://golang.org/cl/7338045

12 years agonet: make use of testing.B.Skip and reflect.DeepEqual in test
Mikio Hara [Mon, 25 Feb 2013 14:05:40 +0000 (23:05 +0900)]
net: make use of testing.B.Skip and reflect.DeepEqual in test

This CL addresses the comments on CL 7368046 that I've overlooked.

Update #4866.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7369052

12 years agogo/types: unresolved literal keys must be looked up in universe.
Rémy Oudompheng [Mon, 25 Feb 2013 05:57:16 +0000 (21:57 -0800)]
go/types: unresolved literal keys must be looked up in universe.

Fixes #4888.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/7383051

12 years agocmd/godoc: show examples in text mode
Volker Dobler [Sun, 24 Feb 2013 23:37:17 +0000 (10:37 +1100)]
cmd/godoc: show examples in text mode

Added the command line flag -ex to godoc to print examples in
text output.

Samples from the generated output:

$ godoc -ex strings Index
...
func Index(s, sep string) int
    Index returns the index of the first instance of sep in s, or -1 if sep
    is not present in s.

    Example:
        fmt.Println(strings.Index("chicken", "ken"))
        fmt.Println(strings.Index("chicken", "dmr"))
        // Output:
        // 4
        // -1
...

$ godoc -ex container/heap
...
package heap
    import "container/heap"

    Package heap provides heap operations for any type that implements
    heap.Interface. A heap is a tree with the property that each node is the
    minimum-valued node in its subtree.

    Example:
        // This example demonstrates an integer heap built using the heap interface.
        package heap_test

        import (
            "container/heap"
            "fmt"
        ...

    Example:
        // This example demonstrates a priority queue built using the heap interface.
        package heap_test

        import (
            "container/heap"
            "fmt"
        )
...

Fixes #3587.

R=golang-dev, minux.ma, adg, rsc, gri
CC=golang-dev
https://golang.org/cl/7356043

12 years agocmd/vet: fix up some nits in print.go found by kamil.kisiel@gmail.com
Rob Pike [Sun, 24 Feb 2013 21:18:36 +0000 (13:18 -0800)]
cmd/vet: fix up some nits in print.go found by kamil.kisiel@gmail.com

R=golang-dev, kamil.kisiel, bradfitz
CC=golang-dev
https://golang.org/cl/7369049

12 years agocmd/vet: eliminate false positives for slices in untagged literal test
Rob Pike [Sun, 24 Feb 2013 21:18:21 +0000 (13:18 -0800)]
cmd/vet: eliminate false positives for slices in untagged literal test
Made possible by go/types, as long as the package type-checks OK.

Fixes #4684.

R=golang-dev
CC=golang-dev
https://golang.org/cl/7407045

12 years agocrypto/rsa: fix infinite loop in GenerateMultiPrimeKey for large nprimes
Rémy Oudompheng [Sun, 24 Feb 2013 16:19:09 +0000 (17:19 +0100)]
crypto/rsa: fix infinite loop in GenerateMultiPrimeKey for large nprimes

The heuristics for BitLen of a product of randomly generated primes
are wrong, and the generated candidates never match the required
size for nprimes > 10. This corner case is not expected to be used in
practice.

R=agl
CC=golang-dev
https://golang.org/cl/7397052

12 years agoruntime: remove PROT_EXEC from mmap calls.
Shenghou Ma [Sun, 24 Feb 2013 14:47:22 +0000 (22:47 +0800)]
runtime: remove PROT_EXEC from mmap calls.
Executable heap is gone on Unix!

R=golang-dev, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7405045

12 years agocmd/dist: avoid using %ebx on i386.
Shenghou Ma [Sun, 24 Feb 2013 14:45:53 +0000 (22:45 +0800)]
cmd/dist: avoid using %ebx on i386.
Or gcc (-fPIC) will complain:
cmd/dist/unix.c: In function ‘cansse2’
cmd/dist/unix.c:774: error: can't find a register in class ‘BREG’ while reloading ‘asm’
cmd/dist/unix.c:774: error: ‘asm’ operand has impossible constraints

This affects bootstrapping on native Darwin/386 where all code is
compiled with -fPIC.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7394047

12 years agosyscall: add network interface announce support on BSD variants
Mikio Hara [Sun, 24 Feb 2013 03:36:44 +0000 (12:36 +0900)]
syscall: add network interface announce support on BSD variants

This CL allows to receive network interface arrival and depature
notifications through routing sockets on BSD variants. So far
Darwin doesn't support this feature.

Also does small simplification.

Update #4866.

R=golang-dev, lucio.dere, dave
CC=golang-dev
https://golang.org/cl/7365055

12 years agosyscall: add if_announce support for openbsd
Mikio Hara [Sun, 24 Feb 2013 03:07:20 +0000 (12:07 +0900)]
syscall: add if_announce support for openbsd

Update #4866.

R=golang-dev
CC=golang-dev
https://golang.org/cl/7382053

12 years agosyscall: add if_announce support for netbsd
Mikio Hara [Sun, 24 Feb 2013 03:06:24 +0000 (12:06 +0900)]
syscall: add if_announce support for netbsd

Update #4866.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/7382052

12 years agosyscall: add if_announce support for freebsd
Mikio Hara [Sun, 24 Feb 2013 03:04:48 +0000 (12:04 +0900)]
syscall: add if_announce support for freebsd

Update #4866.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7398047

12 years agocmd/vet: check argument types in printf formats
Rob Pike [Sat, 23 Feb 2013 23:08:36 +0000 (15:08 -0800)]
cmd/vet: check argument types in printf formats
Fixes #4404.

R=gri, rsc
CC=golang-dev
https://golang.org/cl/7378061

12 years agoarchive/tar: simplify use of constants in test case.
Robin Eklind [Sat, 23 Feb 2013 19:39:01 +0000 (11:39 -0800)]
archive/tar: simplify use of constants in test case.

Replace setsid with c_ISGID since the constant is already defined.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7403048

12 years agocmd/cgo, cmd/dist, cmd/go: cgo with clang fixes
Shenghou Ma [Sat, 23 Feb 2013 12:24:38 +0000 (20:24 +0800)]
cmd/cgo, cmd/dist, cmd/go: cgo with clang fixes
1. Workaround the smart clang diagnostics with -Qunused-arguments:
clang: error: argument unused during compilation: '-XXX'
2. if "clang -print-libgcc-file-name" returns non-absolute path, don't
provide that on linker command line.
3. Fix dwarf.PtrType.Size() in cmd/cgo as clang doesn't generate
DW_AT_byte_size for pointer types.
4. Workaround warnings for -Wno-unneeded-internal-declaration with
-Wno-unknown-warning-option.
5. Add -Wno-unused-function.
6. enable race detector test on darwin with clang
(at least Apple clang version 1.7 (tags/Apple/clang-77) works).

Requires CL 7354043.

Update #4829
This should fix most parts of the problem, but one glitch still remains.
DWARF generated by newer clang doesn't differentiate these
two function types:
    void *malloc(size_t);
    void *malloc(unsigned long int);
so you might need to do this to make make.bash pass:
sed -i -e 's/C.malloc(C.size_t/C.malloc(C.ulong/' pkg/os/user/lookup_unix.go

R=golang-dev, dave, iant, rsc
CC=golang-dev
https://golang.org/cl/7351044

12 years agoruntime: fix windows cpu profiling
Dmitriy Vyukov [Sat, 23 Feb 2013 06:07:41 +0000 (10:07 +0400)]
runtime: fix windows cpu profiling

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/7407044