All of the currently supported platforms have a working user
implementation and do not use stubs. As a result, enable the tests
on all platforms rather than whitelisting.
R=golang-dev, dave, iant
CC=golang-dev
https://golang.org/cl/14454044
If an iterator is started while a map is in the middle of a grow,
and the map has NaN keys, then those keys might get returned by
the iterator more than once. This fix makes the evacuation decision
deterministic and repeatable for NaN keys so each one gets returned
only once.
R=golang-dev, r, khr, iant
CC=golang-dev
https://golang.org/cl/14367043
Failure occurred when using reflect.Call to pass a func value
following a non-pointer value.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14186043
Explain for those unfamiliar with twos-complement arithmetic how to
implement negation of signed positive constant.
Fixes#6408.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/14267044
Changing from 4 kB to 8 kB brings significant improvement
on a variety of the Go 1 benchmarks, on both amd64
and 386 systems.
Significant runtime reductions:
amd64 386
GoParse -14% -1%
GobDecode -12% -20%
GobEncode -64% -1%
JSONDecode -9% -4%
JSONEncode -15% -5%
Template -17% -14%
In the longer term, khr's new stacks will avoid needing to
make this decision at all, but for Go 1.2 this is a reasonable
stopgap that makes performance significantly better.
Demand paging should mean that if the second 4 kB is not
used, it will not be brought into memory, so the change
should not adversely affect resident set size.
The same argument could justify bumping as high as 64 kB
on 64-bit machines, but there are diminishing returns
after 8 kB, and using 8 kB limits the possible unintended
memory overheads we are not aware of.
Benchmark graphs at
http://swtch.com/~rsc/gostackamd64.htmlhttp://swtch.com/~rsc/gostack386.html
Full data at
http://swtch.com/~rsc/gostack.zip
R=golang-dev, khr, dave, bradfitz, dvyukov
CC=golang-dev
https://golang.org/cl/14317043
Add the -installsuffix flag to gc and {5,6,8}l, which overrides -race
for the suffix if both are supplied.
Pass this flag from the go tool for build and install.
R=rsc
CC=golang-dev
https://golang.org/cl/14246044
It is not possible to use (there is no declaration in package syscall),
and no one seems to care.
Alex Brainman may bring this back properly for Go 1.3.
Fixes#6338.
R=golang-dev, r, alex.brainman
CC=golang-dev
https://golang.org/cl/14287043
RawMessage is useful and mildly non-obvious.
Given the frequency with which RawMessage questions
show up on golang-nuts, and get answered with an example,
I suspect adding an example to the docs might help.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14190044
Not scanning the stack by frames means we are reintroducing
a few false positives into the collection. Run the finalizer registration
in its own goroutine so that stack is guaranteed to be out of
consideration in a later collection.
This is working around a regression from yesterday's tip, but
it's not a regression from Go 1.1.
R=golang-dev
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/14290043
Ticket 13740047 updated the documented TLS version to 1.2.
This also updates the RFC refered to.
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/14029043
Added a new $GO_DISTFLAGS to make.bash, and while we're here,
added mention $CXX in make.bash (CL 13704044).
Fixes#6448.
Update #3564
We can pass GO_DISTFLAGS=-s from misc/dist to make.bash so that
it will build a statically linked toolchain.
(Note: OS X doesn't have the concept of static linking, so don't
pass GO_DISTFLAGS=-s for OS X builds)
R=adg, rsc, iant
CC=golang-dev
https://golang.org/cl/13887043
Currently, the directories generaed by includeArgs can have the "_race"
suffix added if invoked with -race flag, but ignores -installsuffix if
set.
R=adg, rsc
CC=golang-dev
https://golang.org/cl/14174043
Fixes#5537.
To avoid `go install -v race std` replacing cmd/cgo with a race enabled version and another package trying to build a cgo enabled package, always build cmd/cgo race enabled before doing the rest of the build.
R=remyoudompheng, rsc, dvyukov, minux.ma
CC=golang-dev
https://golang.org/cl/14071044
The argument slice was kept hidden from the garbage collector
by destroying its referent in an unsafe.Pointer to uintptr
conversion. This change preserves the unsafe.Pointer referent
and only performs an unsafe.Pointer to uintptr conversions
within expressions that construct new unsafe.Pointer values.
R=golang-dev, khr, rsc
CC=golang-dev
https://golang.org/cl/14008043
AES-GCM cipher suites are only defined for TLS 1.2, although there's
nothing really version specific about them. However, development
versions of NSS (meaning Firefox and Chrome) have an issue where
they'll advertise TLS 1.2-only cipher suites in a TLS 1.1 ClientHello
but then balk when the server selects one.
This change causes Go clients not to advertise TLS 1.2 cipher suites
unless TLS 1.2 is being used, and prevents servers from selecting them
unless TLS 1.2 has been negotiated.
https://code.google.com/p/chromium/issues/detail?id=297151https://bugzilla.mozilla.org/show_bug.cgi?id=919677
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13573047
Use the symbol prefixes with the prologue functions when using
gccgo.
Use an & when referring to a function declared as a variable.
Fix the malloc prologue function.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13878043
After text/template.Parse, all the templates may have changed, so
we need to set them all back to their unescaped state. The code
did this but (mea culpa) forgot to set the Tree field of the html/template
struct.
Since the Tree is reset during escaping, this only matters if an error
arises during escaping and we want to print a message.
Fixes#6459.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13877043
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
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
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