]>
Cypherpunks repositories - gostls13.git/log
Robert Griesemer [Tue, 24 Sep 2013 23:35:35 +0000 (16:35 -0700)]
go/ast: add Slice3 field to SliceExpr
If Slice3 is set, the expression is
a 3-index slice expression (2 colons).
Required for type-checking.
Backward-compatible API extension.
R=r, rsc
CC=golang-dev
https://golang.org/cl/
13826050
Kamil Kisiel [Tue, 24 Sep 2013 23:32:23 +0000 (16:32 -0700)]
math/big: Fix variable name in documentation for *Int.Bytes and BitLen.
R=golang-dev, iant, gri
CC=golang-dev
https://golang.org/cl/
13869043
Russ Cox [Tue, 24 Sep 2013 19:54:48 +0000 (15:54 -0400)]
sync/atomic: adjust for new runtime.cas64 prototype
R=golang-dev, minux.ma, josharian
CC=golang-dev
https://golang.org/cl/
13859043
Russ Cox [Tue, 24 Sep 2013 19:52:48 +0000 (15:52 -0400)]
cmd/cgo: retain Go pointer passed to C call for duration of call
Fixes #6397.
R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/
13858043
Shenghou Ma [Tue, 24 Sep 2013 04:17:08 +0000 (00:17 -0400)]
cmd/dist, cmd/go: embed default C++ compiler into cmd/go
Fixes #6426.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/
13704044
Alex Brainman [Tue, 24 Sep 2013 03:15:49 +0000 (13:15 +1000)]
net: re-enable raw socket tests on windows
Since CL
38bf89161a72 raw socket tests are not executed
on windows builders. This change re-enable them again.
It will attempt to run raw socket tests only if user
is permitted to create raw socket by OS.
Fixes #6392
R=golang-dev
CC=golang-dev, mikioh.mikioh, rsc
https://golang.org/cl/
13422044
Brad Fitzpatrick [Tue, 24 Sep 2013 02:57:19 +0000 (19:57 -0700)]
encoding/json: don't cache value addressability when building first encoder
newTypeEncoder (called once per type and then cached) was
looking at the first value seen of that type's addressability
and caching the encoder decision. If the first value seen was
addressable and a future one wasn't, it would panic.
Instead, introduce a new wrapper encoder type that checks
CanAddr at runtime.
Fixes #6458
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13839045
Russ Cox [Tue, 24 Sep 2013 02:40:24 +0000 (22:40 -0400)]
net: ensure that ResolveTCPAddr(addr.String()) reproduces addr
And same for UDP.
Fixes #6465.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13740048
Albert Strasheim [Tue, 24 Sep 2013 02:33:42 +0000 (22:33 -0400)]
net: fix Close of autobind unix listener
Fixes #6455.
R=mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/
13457058
Andrew Gerrand [Tue, 24 Sep 2013 00:49:54 +0000 (10:49 +1000)]
reflect: update docs; Interface can return a method value
Fixes #6460.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13761046
Russ Cox [Mon, 23 Sep 2013 21:16:59 +0000 (17:16 -0400)]
net/http: accept Content-Range for entire file
Fixes a bug reported privately.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13846043
Dmitriy Vyukov [Mon, 23 Sep 2013 21:15:20 +0000 (14:15 -0700)]
misc/pprof: support block profile
Fixes #6347.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13845044
Brad Fitzpatrick [Mon, 23 Sep 2013 20:56:21 +0000 (13:56 -0700)]
api: update next.txt
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
13820046
Russ Cox [Mon, 23 Sep 2013 20:29:53 +0000 (16:29 -0400)]
cmd/cgo: update #cgo docs to reflect reality
The syntax accepted is full build constraints, not just
GOOS, GOARCH, and GOOS/GOARCH.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13504048
Russ Cox [Mon, 23 Sep 2013 20:05:36 +0000 (16:05 -0400)]
runtime/pprof: fix profile parser in test
Fixes #6417.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13843043
Russ Cox [Mon, 23 Sep 2013 20:05:23 +0000 (16:05 -0400)]
crypto/tls: document that the package supports TLS 1.2
Fixes #6456.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13740047
Russ Cox [Mon, 23 Sep 2013 19:58:35 +0000 (15:58 -0400)]
undo CL
13321048 /
9567c5da6e25
Makes build unnecessarily slower. Will fix the parser instead.
««« original CL description
runtime/pprof: run TestGoroutineSwitch for longer
Short test now takes about 0.5 second here.
Fixes #6417.
The failure was also seen on our builders.
R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/
13321048
»»»
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
13720048
Kamil Kisiel [Mon, 23 Sep 2013 17:19:08 +0000 (13:19 -0400)]
reflect: add example for StructTag
Fix a few minor vet quibbles while I'm here.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13235059
Shenghou Ma [Mon, 23 Sep 2013 17:08:00 +0000 (13:08 -0400)]
cmd/ld: fix "_image_base__ not defined" problem for cmd/8l.
Fixes #6431.
Change suggested by kin.wilson.za.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13314048
Péter Surányi [Mon, 23 Sep 2013 08:11:25 +0000 (18:11 +1000)]
go/build: add go1.2 build tag
Fixes #6449.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
13829044
Rob Pike [Mon, 23 Sep 2013 06:03:57 +0000 (16:03 +1000)]
fmt: one bad index shouldn't spoil them all
In an indexed verb such as %[3]d, if the index is out of range, don't
skip processing the rest of the verbs. The bug was that the bad
index set a bit for the whole format instead of just the verb.
Ok for 1.2 because this is a bug in a 1.2 feature.
Fixes #6434
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
13632058
Shenghou Ma [Mon, 23 Sep 2013 05:23:42 +0000 (01:23 -0400)]
doc/go1.2: document that godoc and vet will always be installed to their old locations (not $GOPATH/bin).
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13830043
Andrew Gerrand [Mon, 23 Sep 2013 05:14:26 +0000 (15:14 +1000)]
doc: mention os/exec StdinPipe change in Go 1.2 doc
Fixes #6439.
R=r, minux.ma
CC=golang-dev
https://golang.org/cl/
13478045
Rob Pike [Mon, 23 Sep 2013 04:41:20 +0000 (14:41 +1000)]
doc/go1.2.html: fix 3-index slice example
A number was wrong; adjust as suggested to make things clearer.
Fixes #6452
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
13422046
Dmitry Chestnykh [Mon, 23 Sep 2013 02:53:55 +0000 (19:53 -0700)]
net/http: send correct time in Date header.
Date header indicated that it contained GMT time,
however it actually sent local time. Fixed by
converting time to UTC.
Also fixes incorrect comment in appendTime().
Regression since CL
9432046 .
R=golang-dev, dave, bradfitz
CC=golang-dev
https://golang.org/cl/
13386047
ChaiShushan [Mon, 23 Sep 2013 01:35:17 +0000 (11:35 +1000)]
misc/notepadplus: fix some number syntax highlight issue
notepadplus can only support some normal golang's hex and imaginary numbers.
it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in ".0").
R=golang-dev, gvdschoot
CC=ajstarks, golang-dev
https://golang.org/cl/
13401047
Andrew Gerrand [Sun, 22 Sep 2013 23:35:52 +0000 (09:35 +1000)]
A+C: Nathan John Youngman (individual CLA)
Generated by addca.
R=gobot
CC=golang-dev
https://golang.org/cl/
13819045
Dmitriy Vyukov [Sun, 22 Sep 2013 17:56:06 +0000 (10:56 -0700)]
runtime/race: update runtime to r191161.
Fixes #6305.
R=golang-dev, dave, alex.brainman, r
CC=golang-dev
https://golang.org/cl/
13359046
Alex Brainman [Sun, 22 Sep 2013 07:31:08 +0000 (17:31 +1000)]
runtime/pprof: run TestGoroutineSwitch for longer
Short test now takes about 0.5 second here.
Fixes #6417.
The failure was also seen on our builders.
R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/
13321048
Brad Fitzpatrick [Sun, 22 Sep 2013 07:01:17 +0000 (08:01 +0100)]
cmd/api: always do API check if hg is available
Fixes #6124
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
13500046
Dominik Honnef [Sat, 21 Sep 2013 21:28:52 +0000 (07:28 +1000)]
doc/go1.2.html: Go 1.2, not Go1.2
R=r
CC=golang-dev
https://golang.org/cl/
13735044
Rob Pike [Sat, 21 Sep 2013 07:53:44 +0000 (17:53 +1000)]
doc/go1.2.html: pre-emption; cgo and C++
These were bullet points that I had neglected to flesh out.
R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/
13816043
Carl Shapiro [Sat, 21 Sep 2013 00:27:56 +0000 (17:27 -0700)]
test/chan: avoid wrap-around in memstats comparison
The select2.go test assumed that the memory allocated between
its two samplings of runtime.ReadMemStats is strictly
increasing. To avoid failing the tests when this is not true,
a greater-than check is introduced before computing the
difference in allocated memory.
R=golang-dev, r, cshapiro
CC=golang-dev
https://golang.org/cl/
13701046
Russ Cox [Fri, 20 Sep 2013 20:00:13 +0000 (16:00 -0400)]
cmd/yacc: report correct line for 'default action causes potential type clash'
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13588044
Russ Cox [Fri, 20 Sep 2013 19:25:59 +0000 (15:25 -0400)]
test/run: print command line for running an individual test
Fixes #5087.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13812043
Russ Cox [Fri, 20 Sep 2013 19:25:43 +0000 (15:25 -0400)]
cmd/gc: fix imported and not used error for import .
Fixes issues 6420.
R=ken2
CC=golang-dev
https://golang.org/cl/
13703044
Russ Cox [Fri, 20 Sep 2013 19:15:43 +0000 (15:15 -0400)]
cmd/gc: print expression in 'duplicate case in switch' error
The line number alone does not help when the line is
case '~', '*', '(', ')', '[', ']', '{', '}', '?', ':', ';', ',', '*', '%', '^', '!', '=', '<', '>', '+', '-', '&', '|':
R=ken2
CC=golang-dev
https://golang.org/cl/
13431046
Russ Cox [Fri, 20 Sep 2013 19:15:25 +0000 (15:15 -0400)]
runtime: avoid allocation of internal panic values
If a fault happens in malloc, inevitably the next thing that happens
is a deadlock trying to allocate the panic value that says the fault
happened. Stop doing that, two ways.
First, reject panic in malloc just as we reject panic in garbage collection.
Second, runtime.panicstring was using an error implementation
backed by a Go string, so the interface held an allocated *string.
Since the actual errors are C strings, define a new error
implementation backed by a C char*, which needs no indirection
and therefore no allocation.
This second fix will avoid allocation for errors like nil panic derefs
or division by zero, so it is worth doing even though the first fix
should take care of faults during malloc.
Update #6419
R=golang-dev, dvyukov, dave
CC=golang-dev
https://golang.org/cl/
13774043
Robert Griesemer [Fri, 20 Sep 2013 16:40:56 +0000 (09:40 -0700)]
test/fixedbugs/bug295.go: fix test in anticipation of future gc fix
See also issue 6428.
R=r, rsc
CC=golang-dev
https://golang.org/cl/
13794043
Shenghou Ma [Fri, 20 Sep 2013 14:04:52 +0000 (10:04 -0400)]
cmd/ld: fix "ld -s" to not discard pclntab.
Fixes #6245.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
13751045
David Symonds [Fri, 20 Sep 2013 05:49:26 +0000 (15:49 +1000)]
crypto/x509: update comment on system root cert locations.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13775045
Ian Lance Taylor [Thu, 19 Sep 2013 22:20:39 +0000 (15:20 -0700)]
test: add a test that causes gccgo to get a failure at link time
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13788043
Andrew Gerrand [Thu, 19 Sep 2013 12:34:33 +0000 (22:34 +1000)]
untag go1.2rc1
Looks like the dist tool really doesn't like tags.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13354049
Rémy Oudompheng [Thu, 19 Sep 2013 07:23:04 +0000 (09:23 +0200)]
cmd/gc: cleanup SWITCH nodes after walk.
Keeping pointers from the pre-walk phase confuses
the race detection instrumentation.
Fixes #6418.
R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/
13368057
Andrew Gerrand [Thu, 19 Sep 2013 07:12:00 +0000 (17:12 +1000)]
tag go1.2rc1
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/
13777043
Andrew Gerrand [Thu, 19 Sep 2013 06:51:29 +0000 (16:51 +1000)]
misc/dist: add 'label' part of distro name, include blog content
This will allow us to cut binaries with names like:
go1.2rc1.darwin-amd64-osx10.6.pkg
go1.2rc1.darwin-amd64-osx10.8.pkg
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13629045
Shenghou Ma [Thu, 19 Sep 2013 06:27:53 +0000 (02:27 -0400)]
cmd/ld: handle IMAGE_SYM_CLASS_LABEL symbols.
Was causing "invalid symbol binding" and thus "malformed pe file" error.
R=golang-dev, alex.brainman, adg
CC=golang-dev
https://golang.org/cl/
13722050
Shenghou Ma [Thu, 19 Sep 2013 05:20:02 +0000 (01:20 -0400)]
cmd/go: fix missing __mingw_fprintf symbol for cgo on windows
Fixes #5986.
R=golang-dev, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/
13261055
Shenghou Ma [Thu, 19 Sep 2013 02:27:25 +0000 (22:27 -0400)]
cmd/ld: handle duplicate static symbols in COFF and Mach-O files.
Fixes #5740.
R=iant, rsc, luisbebop
CC=gobot, golang-dev
https://golang.org/cl/
10345046
Rob Pike [Thu, 19 Sep 2013 01:19:11 +0000 (11:19 +1000)]
cmd/go: write the WORK=/tmp/... line to stderr
Unlike the other output from the -x flag, it was going to stdout.
Fixes #6362.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13746044
Ian Lance Taylor [Wed, 18 Sep 2013 23:30:38 +0000 (16:30 -0700)]
test: add a test that gccgo failed to compile
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13632057
Ian Lance Taylor [Wed, 18 Sep 2013 22:47:50 +0000 (15:47 -0700)]
test: add a test that gccgo failed to compile
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13451045
Alan Donovan [Wed, 18 Sep 2013 18:44:57 +0000 (14:44 -0400)]
test: disable failing tests under ssa/interp.
R=gri
CC=golang-dev
https://golang.org/cl/
13471045
Ian Lance Taylor [Wed, 18 Sep 2013 01:06:58 +0000 (18:06 -0700)]
test: add a test that crashed gccgo
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13683046
Thomas Habets [Wed, 18 Sep 2013 00:48:28 +0000 (10:48 +1000)]
net/http/cgi: use 'https://' for urls if HTTPS is set.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
13700044
Andrew Gerrand [Wed, 18 Sep 2013 00:48:11 +0000 (10:48 +1000)]
C: add Thomas Habets (Google CLA)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
13501050
Dave Cheney [Wed, 18 Sep 2013 00:15:52 +0000 (10:15 +1000)]
cmd/gc: fix set but not used error
R=rsc, r
CC=golang-dev
https://golang.org/cl/
13749044
Ian Lance Taylor [Wed, 18 Sep 2013 00:10:48 +0000 (17:10 -0700)]
cmd/go: add basic docs on calling between Go and C/C++
This is a framework for docs on the subject more than it is
actual docs.
The section header in go/doc.go just says "C", not "C/C++,"
because otherwise godoc doesn't recognize the line as a
section header.
Fixes #5473.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13280050
Robert Griesemer [Tue, 17 Sep 2013 22:24:54 +0000 (15:24 -0700)]
test: avoid future 'declared and not used' error
See also issue 6414.
R=r
CC=golang-dev
https://golang.org/cl/
13683044
Robert Griesemer [Tue, 17 Sep 2013 22:24:40 +0000 (15:24 -0700)]
encoding/xml: remove dead code
Avoid future 'declared and not used error'.
See also issue 6414.
R=r
CC=golang-dev
https://golang.org/cl/
13242058
Ian Lance Taylor [Tue, 17 Sep 2013 22:22:42 +0000 (15:22 -0700)]
reflect: test method calls on pointers to pointers
Gccgo got this wrong, and evidently nothing else tests it.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13709045
Russ Cox [Tue, 17 Sep 2013 20:54:22 +0000 (16:54 -0400)]
cmd/gc: eliminate redundant &x.Field nil checks
This eliminates ~75% of the nil checks being emitted,
on all architectures. We can do better, but we need
a bit more general support from the compiler, and
I don't want to do that so close to Go 1.2.
What's here is simple but effective and safe.
A few small code generation cleanups were required
to make the analysis consistent on all systems about
which nil checks are omitted, at least in the test.
Fixes #6019.
R=ken2
CC=golang-dev
https://golang.org/cl/
13334052
Adam Langley [Tue, 17 Sep 2013 17:30:36 +0000 (13:30 -0400)]
crypto/tls: don't select ECDSA ciphersuites with only an RSA certificate.
47ec7a68b1a2 added support for ECDSA ciphersuites but didn't alter the
cipher suite selection to take that into account. Thus Go servers could
try and select an ECDSA cipher suite while only having an RSA
certificate, leading to connection failures.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13239053
Ian Lance Taylor [Tue, 17 Sep 2013 14:11:40 +0000 (07:11 -0700)]
cmd/cgo: rearrange and update documentation
In particular document that the Go tool will look for certain
file extensions and compile with them with either the C or the
C++ compiler.
Fixes #6393.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13733043
Josh Bleecher Snyder [Tue, 17 Sep 2013 04:19:44 +0000 (14:19 +1000)]
text/template/parse, html/template: copy Tree.text during html template clone
The root cause of the panic reported in https://code.google.com/p/go/issues/detail?id=5980
is that parse's Tree.Text wasn't being copied during the clone.
Fix this by adding and using a Copy method for parse.Tree.
Fixes #5980.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
12420044
Dave Cheney [Tue, 17 Sep 2013 03:43:27 +0000 (13:43 +1000)]
cmd/6c, cmd/6g, cmd/cc: fix undefined behavior warnings
Update #5764
Like Tribbles, the more you kill, the more spring up in their place.
R=rsc
CC=golang-dev
https://golang.org/cl/
13324049
Carl Shapiro [Tue, 17 Sep 2013 02:03:19 +0000 (19:03 -0700)]
runtime: export PCDATA value reader
This interface is required to use the PCDATA interface
implemented in Go 1.2. While initially entirely private, the
FUNCDATA side of the interface has been made public. This
change completes the FUNCDATA/PCDATA interface.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13735043
Rémy Oudompheng [Tue, 17 Sep 2013 00:31:21 +0000 (20:31 -0400)]
cmd/gc, runtime: inline append in frontend.
A new transformation during walk turns append calls
into a combination of growslice and memmove.
benchmark old ns/op new ns/op delta
BenchmarkAppend 141 141 +0.00%
BenchmarkAppend1Byte 18 11 -39.56%
BenchmarkAppend4Bytes 19 10 -42.63%
BenchmarkAppend7Bytes 18 10 -42.16%
BenchmarkAppend8Bytes 18 10 -40.44%
BenchmarkAppend15Bytes 19 11 -41.67%
BenchmarkAppend16Bytes 19 11 -41.97%
BenchmarkAppend32Bytes 23 14 -38.82%
BenchmarkAppendStr1Byte 14 10 -23.78%
BenchmarkAppendStr4Bytes 14 11 -21.13%
BenchmarkAppendStr8Bytes 14 10 -25.17%
BenchmarkAppendStr16Bytes 19 11 -41.45%
BenchmarkAppendStr32Bytes 18 14 -19.44%
BenchmarkAppendSpecialCase 62 63 +1.77%
R=golang-dev, khr, cshapiro, rsc, dave
CC=golang-dev
https://golang.org/cl/
12815046
Russ Cox [Tue, 17 Sep 2013 00:27:57 +0000 (20:27 -0400)]
cmd/nm: make -S listing a bit more accurate
Hide container symbols like text and etext so that
the individual pieces inside are shown instead.
For example, if text and main.init have the same
address, it was a toss-up which name was printed.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13722046
Russ Cox [Tue, 17 Sep 2013 00:26:10 +0000 (20:26 -0400)]
build: disable precise collection of stack frames
The code for call site-specific pointer bitmaps was not ready in time,
but the zeroing required without it is too expensive to use by default.
We will have to wait for precise collection of stack frames until Go 1.3.
The precise collection can be re-enabled by
GOEXPERIMENT=precisestack ./all.bash
but that will not be the default for a Go 1.2 build.
Fixes #6087.
R=golang-dev, jeremyjackins, dan.kortschak, r
CC=golang-dev
https://golang.org/cl/
13677045
Rob Pike [Mon, 16 Sep 2013 21:41:45 +0000 (07:41 +1000)]
effective_go: add a discussion of labeled break and continue
Fixes #5725.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13705044
Rob Pike [Mon, 16 Sep 2013 21:41:11 +0000 (07:41 +1000)]
spec: add example for continue to label
Make the break example slightly more interesting
Update #5725
Effective Go will be updated in a separate CL.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13368054
Adam Langley [Mon, 16 Sep 2013 20:39:42 +0000 (16:39 -0400)]
crypto/tls: fix TLS 1.2 client certificates.
With TLS 1.2, when sending client certificates the code was omitting
the new (in TLS 1.2) signature and hash fields.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13413050
Ian Lance Taylor [Mon, 16 Sep 2013 20:19:32 +0000 (13:19 -0700)]
cmd/cgo: remove inaccurate comment
All these features have in fact been implemented.
R=rsc
CC=golang-dev
https://golang.org/cl/
13419049
Russ Cox [Mon, 16 Sep 2013 19:55:16 +0000 (15:55 -0400)]
cmd/gc: do not report fields when looking for methods
Fixes #6395.
R=ken2
CC=golang-dev
https://golang.org/cl/
13470046
Russ Cox [Mon, 16 Sep 2013 19:11:32 +0000 (15:11 -0400)]
runtime: fix uint64 division on 386
The uint64 divide function calls _mul64x32 to do a 64x32-bit multiply
and then compares the result against the 64-bit numerator.
If the result is bigger than the numerator, must use the slow path.
Unfortunately, the 64x32 produces a 96-bit product, and only the
low 64 bits were being used in the comparison. Return all 96 bits,
the bottom 64 via the original uint64* pointer, and the top 32
as the function's return value.
Fixes 386 build (broken by ARM division tests).
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13722044
Russ Cox [Mon, 16 Sep 2013 18:22:37 +0000 (14:22 -0400)]
cmd/gc: fix divide by zero error in compiler
Fixes #6399.
R=ken2
CC=golang-dev
https://golang.org/cl/
13253055
Russ Cox [Mon, 16 Sep 2013 18:22:24 +0000 (14:22 -0400)]
runtime: fix freebsd build
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/
13720044
Russ Cox [Mon, 16 Sep 2013 18:21:54 +0000 (14:21 -0400)]
cmd/cgo: fix build (missing file from earlier CL)
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/
13700045
Russ Cox [Mon, 16 Sep 2013 18:05:06 +0000 (14:05 -0400)]
net: make all.bat run for ordinary Windows users
This CL is required for all.bat to work out of the box on
my Windows 8 laptop.
These tests either require the firewall to be turned off
or require the user to be in the Administrators group.
I don't know which.
Alex may follow up with a refinement of the test to
allow them to run if the user is in the Administrators
group.
Fixes #6392.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13421049
Russ Cox [Mon, 16 Sep 2013 18:04:55 +0000 (14:04 -0400)]
cmd/cgo: allow C.malloc(0) always
Because we can, and because it otherwise might crash
the program if we think we're out of memory.
Fixes #6390.
R=golang-dev, iant, minux.ma
CC=golang-dev
https://golang.org/cl/
13345048
Russ Cox [Mon, 16 Sep 2013 18:04:45 +0000 (14:04 -0400)]
runtime: make ARM integer div-by-zero traceback-friendly
The implementation of division in the 5 toolchain is a bit too magical.
Hide the magic from the traceback routines.
Also add a test for the results of the software divide routine.
Fixes #5805.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
13239052
Russ Cox [Mon, 16 Sep 2013 18:04:32 +0000 (14:04 -0400)]
runtime, syscall: work around FreeBSD/amd64 kernel bug
The kernel implementation of the fast system call path,
the one invoked by the SYSCALL instruction, is broken for
restarting system calls. A C program demonstrating this is below.
Change the system calls to use INT $0x80 instead, because
that (perhaps slightly slower) system call path actually works.
I filed http://www.freebsd.org/cgi/query-pr.cgi?pr=182161.
The C program demonstrating that it is FreeBSD's fault is below.
It reports the same "Bad address" failures from wait.
#include <sys/time.h>
#include <sys/signal.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
static void handler(int);
static void* looper(void*);
int
main(void)
{
int i;
struct sigaction sa;
pthread_cond_t cond;
pthread_mutex_t mu;
memset(&sa, 0, sizeof sa);
sa.sa_handler = handler;
sa.sa_flags = SA_RESTART;
memset(&sa.sa_mask, 0xff, sizeof sa.sa_mask);
sigaction(SIGCHLD, &sa, 0);
for(i=0; i<2; i++)
pthread_create(0, 0, looper, 0);
pthread_mutex_init(&mu, 0);
pthread_mutex_lock(&mu);
pthread_cond_init(&cond, 0);
for(;;)
pthread_cond_wait(&cond, &mu);
return 0;
}
static void
handler(int sig)
{
}
int
mywait4(int pid, int *stat, int options, struct rusage *rusage)
{
int result;
asm("movq %%rcx, %%r10; syscall"
: "=a" (result)
: "a" (7),
"D" (pid),
"S" (stat),
"d" (options),
"c" (rusage));
}
static void*
looper(void *v)
{
int pid, stat, out;
struct rusage rusage;
for(;;) {
if((pid = fork()) == 0)
_exit(0);
out = mywait4(pid, &stat, 0, &rusage);
if(out != pid) {
printf("wait4 returned %d\n", out);
}
}
}
Fixes #6372.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
13582047
Rob Pike [Mon, 16 Sep 2013 12:53:12 +0000 (22:53 +1000)]
cmd/go: document that "main" is a reserved import path
Fixes #6312.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/
13391049
Han-Wen Nienhuys [Mon, 16 Sep 2013 06:29:04 +0000 (16:29 +1000)]
net/rpc: log I/O and internal errors only if debugLog is set.
Fixes #6367.
R=rsc, r
CC=golang-dev
https://golang.org/cl/
13395047
Nigel Tao [Mon, 16 Sep 2013 06:26:07 +0000 (16:26 +1000)]
doc/go1.2.html: add a "New packages" section similar to
http://golang.org/doc/go1.1#new_packages
R=r
CC=golang-dev
https://golang.org/cl/
13368053
Rob Pike [Mon, 16 Sep 2013 06:13:27 +0000 (16:13 +1000)]
cmd/nm: put the -S flag in the usage message
The -S flag reports symbol size, but is missing from the usage message.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
13660046
Andrew Gerrand [Mon, 16 Sep 2013 05:47:13 +0000 (15:47 +1000)]
doc: re-organize golang.org site content
Remove "References" section.
Remove most articles and redirect to blog.golang.org.
Move /ref/spec and /ref/mem to /doc/spec and /doc/mem.
Remove duplicate links from the remaining
"Documents", "The Project", and "Help" pages.
Defer to the wiki for more links and community content.
Update command reference and mention cover tool.
Add "Pop-out" text to the front page.
Pick one of four videos at random to feature on the front page.
Fixes #2547.
Fixes #5561.
Fixes #6321.
R=r, dominik.honnef
CC=golang-dev
https://golang.org/cl/
13724043
Rob Pike [Mon, 16 Sep 2013 03:03:00 +0000 (13:03 +1000)]
doc/go1.2.html: compiler changes
Document the semantic changes within the gc toolchain.
Also delete the mention of unbalanced right delims in template
That change was rolled back.
Absent typos, things we've forgotten, and new things that happen,
the release notes are ready.
R=golang-dev, adg, dominik.honnef
CC=golang-dev
https://golang.org/cl/
13368052
Andrew Gerrand [Mon, 16 Sep 2013 03:02:01 +0000 (13:02 +1000)]
sort: move example to package level and simplify further
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
13634044
Andrew Gerrand [Mon, 16 Sep 2013 01:20:07 +0000 (11:20 +1000)]
doc: add uninstallation instructions
Fixes #5821.
R=golang-dev, kamil.kisiel
CC=golang-dev
https://golang.org/cl/
13720043
Andrew Gerrand [Mon, 16 Sep 2013 01:19:39 +0000 (11:19 +1000)]
cmd/gofmt: document -s transformations
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
13721043
Rob Pike [Mon, 16 Sep 2013 00:28:53 +0000 (10:28 +1000)]
doc/go1.2.html: net/http, encoding, performance, library changes
Everything is done except compiler changes and additional platforms, if any.
R=golang-dev, dominik.honnef, adg
CC=golang-dev
https://golang.org/cl/
13484045
Rob Pike [Mon, 16 Sep 2013 00:26:23 +0000 (10:26 +1000)]
encoding/gob: ignore chan and func fields of structures
Previously, fields of type chan or func caused an error.
Now we just treat them like unexported fields and ignore them.
This makes it easier to guarantee long-term compatibilty since
a substructure from another package cannot break gob
encoding by adding a func or chan field.
Fixes #6071
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
13693043
Russ Cox [Sun, 15 Sep 2013 16:05:24 +0000 (12:05 -0400)]
runtime: fix CPU profiling on Windows
The test 'gp == m->curg' is not valid on Windows,
because the goroutine being profiled is not from the
current m.
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/
13718043
Russ Cox [Sun, 15 Sep 2013 15:29:47 +0000 (11:29 -0400)]
go/build: add ctxt.MatchFile
Fixes #6369.
R=dsymonds, r
CC=golang-dev
https://golang.org/cl/
13708043
Russ Cox [Sun, 15 Sep 2013 15:29:06 +0000 (11:29 -0400)]
encoding/xml: document behavior for undefined name space prefixes
Fixes #5626.
R=golang-dev, dominik.honnef
CC=golang-dev
https://golang.org/cl/
13702043
Rob Pike [Sun, 15 Sep 2013 00:45:36 +0000 (10:45 +1000)]
fmt: %b for complex64 and complex128
Just an oversight they were missing.
Fixes #6387
R=golang-dev, dominik.honnef, rsc
CC=golang-dev
https://golang.org/cl/
13715043
Rémy Oudompheng [Sat, 14 Sep 2013 07:30:36 +0000 (09:30 +0200)]
cmd/gc: don't generate algs for internal map types.
Fake types describing the internal structure of hashmaps are
generated for use by precise GC.
Generating hash and eq functions for these fake types slows down
the build and wastes space: the go tool binary size is 13MB
instead of 12MB, and the package size on amd64 is 48.7MB instead
of 45.3MB.
R=golang-dev, daniel.morsing, r, khr, rsc, iant
CC=golang-dev
https://golang.org/cl/
13698043
Russ Cox [Fri, 13 Sep 2013 19:43:54 +0000 (15:43 -0400)]
os/exec: add more caveats to StdoutPipe, StderrPipe
(StdinPipe was taken care of by CL
13329043 .)
Fixes #6008.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
13606046