- 15 Sep, 2015 7 commits
-
-
Rob Pike authored
Change-Id: I7de85034d499a9f859ab37d56463073f5cb29b35 Reviewed-on: https://go-review.googlesource.com/14592Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
More protection against random input bytes. Fixes #12614. Change-Id: Ie9f817de1376a10bb80b22ecee3bae4f1d26cc6c Reviewed-on: https://go-review.googlesource.com/14563Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Rob Pike authored
There was no verification in Funcs that the map had valid names, which meant that the error could only be caught when parsing the template that tried to use them. Fix this by validating the names in Funcs and panicking before parsing if there is a bad name. This is arguably an API change, since it didn't trigger a panic before, but Funcs did already panic if the function itself was no good, so I argue it's an acceptable change to add more sanity checks. Fixes #9685. Change-Id: Iabf1d0602c49d830f3ed71ca1ccc7eb9a5521ff5 Reviewed-on: https://go-review.googlesource.com/14562Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Marvin Stenger authored
Cleaning along the way: -convert variable types from int to bool -remove unnecessary functions -remove unnecessary type conversion -remove unnecessary variable declarations -transform struct{string,string} with lookup to map[string]string This change passes go build -toolexec 'toolstash -cmp' -a std. Change-Id: I259728fe4afd7f23b67f08fab856ce0abee57b21 Reviewed-on: https://go-review.googlesource.com/14435Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
They added no value. Change-Id: I9e690379d2dfd983266de0ea5231f2b57c8b1517 Reviewed-on: https://go-review.googlesource.com/14568Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dave Cheney authored
CL 13166 skipped external tests on freebsd/arm with the rationale that the cmd/go tests are not architecture dependent. This CL does the same for linux/arm to help linux/arm users who are building Go on platforms like the Raspberry Pi where ./all.bash frequently times out due to a lack of resources. Change-Id: Iae1a25b63b74200da3f1b5637da0fa5c2dceeb83 Reviewed-on: https://go-review.googlesource.com/13342Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Windows amd64 requires all syscall callers to provide room for first 4 parameters on stack. We do that for all our syscalls, except inside of usleep2. In https://codereview.appspot.com/7563043#msg3 rsc says: "We don't need the stack alignment and first 4 parameters on amd64 because it's just a system call, not an ordinary function call." He seems to be wrong on both counts. But alignment is already fixed. Fix parameter space now too. Fixes #12444 Change-Id: I66a2a18d2f2c3846e3aa556cc3acc8ec6240bea0 Reviewed-on: https://go-review.googlesource.com/14282Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Sep, 2015 9 commits
-
-
Robert Griesemer authored
Fixes #12437. Change-Id: I5463970a6259527003eb0e12903a338cc78e0683 Reviewed-on: https://go-review.googlesource.com/14564Reviewed-by: Chris Manghane <cmang@golang.org>
-
Ian Lance Taylor authored
Glibc uses some special signals for special thread operations. These signals will be used in programs that use cgo and invoke certain glibc functions, such as setgid. In order for this to work, these signals need to not be masked by any thread. Before this change, they were being masked by programs that used os/signal.Notify, because it carefully masks all non-thread-specific signals in all threads so that a dedicated thread will collect and report those signals (see ensureSigM in signal1_unix.go). This change adds the two glibc special signals to the set of signals that are unmasked in each thread. Fixes #12498. Change-Id: I797d71a099a2169c186f024185d44a2e1972d4ad Reviewed-on: https://go-review.googlesource.com/14297Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Austin Clements authored
This puts the _Root* indexes in a more friendly order and tweaks markrootSpans to use a for-range loop instead of its own indexing. Change-Id: I2c18d55c9a673ea396b6424d51ef4997a1a74825 Reviewed-on: https://go-review.googlesource.com/14548Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Commit 0e6a6c51 removed readyExecute a long time ago, but left behind the g.readyg field that was used by readyExecute. Remove this now unused field. Change-Id: I41b87ad2b427974d256ec7a7f6d4bdc2ce8a13bb Reviewed-on: https://go-review.googlesource.com/13111Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
This is a cleanup following cc8f5441, which was a minimal change to fix issue #11617. This consolidates the two places in mSpan_Sweep that update sweepgen. Previously this was necessary because sweepgen must be updated before freeing the span, but we freed large spans early. Now we free large spans later, so there's no need to duplicate the sweepgen update. This also means large spans can take advantage of the sweepgen sanity checking performed for other spans. Change-Id: I23b79dbd9ec81d08575cd307cdc0fa6b20831768 Reviewed-on: https://go-review.googlesource.com/12451Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Marking of span roots can represent a significant fraction of the time spent in mark termination. Simply traversing the span list takes about 1ms per GB of heap and if there are a large number of finalizers (for example, for network connections), it may take much longer. Improve the situation by splitting the span scan into 128 subtasks that can be executed in parallel and load balanced by the markroots parallel for. This lets the GC balance this job across the Ps. A better solution is to do this during concurrent mark, or to improve it algorithmically, but this is a simple change with a lot of bang for the buck. This was suggested by Rhys Hiltner. Updates #11485. Change-Id: I8b281adf0ba827064e154a1b6cc32d4d8031c03c Reviewed-on: https://go-review.googlesource.com/13112Reviewed-by: Keith Randall <khr@golang.org>
-
Austin Clements authored
The call to hash the trace stack reversed the "seed" and "size" arguments to memhash and, hence, always called memhash with a 0 size, which dutifully returned a hash value that depended only on the number of PCs in the stack and not their values. As a result, all stacks were put in to a very subset of the 8,192 buckets. Fix this by passing these arguments in the correct order. Change-Id: I67cd29312f5615c7ffa23e205008dd72c6b8af62 Reviewed-on: https://go-review.googlesource.com/13613Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Håvard Haugen authored
Passes go build -a -toolexec 'toolstash -cmp' std cmd Change-Id: Ief4613cfb341172a85e3a894f44fb2bb308c7b55 Reviewed-on: https://go-review.googlesource.com/14554 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Andrew Gerrand authored
Fixes #12606 Change-Id: Ib68cb20108ad35c3dd96e606649c4c8f9c0f085c Reviewed-on: https://go-review.googlesource.com/14571Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 13 Sep, 2015 2 commits
-
-
Håvard Haugen authored
Change-Id: Id07811a25bf4aa3ff834e7254a3dfb04522b2926 Reviewed-on: https://go-review.googlesource.com/14174Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Dave Cheney authored
Fixes #11959 This test runs 100 concurrent callbacks from C to Go consuming 100 operating system threads, which at 8mb a piece (the default on linux/arm) would reserve over 800mb of address space. This would frequently cause the test to fail on platforms with ~1gb of ram, such as the raspberry pi. This change reduces the thread stack allocation to 256kb, a number picked at random, but at 1/32th the previous size, should allow the test to pass successfully on all platforms. Change-Id: I8b8bbab30ea7b2972b3269a6ff91e6fe5bc717af Reviewed-on: https://go-review.googlesource.com/13731 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Martin Capitanio <capnm9@gmail.com> Reviewed-by: Minux Ma <minux@golang.org>
-
- 12 Sep, 2015 3 commits
-
-
Shenghou Ma authored
It's because runtime links to ntdll, and ntdll exports a couple incompatible libc functions. We must link to msvcrt first and then try ntdll. Fixes #12030. Change-Id: I0105417bada108da55f5ae4482c2423ac7a92957 Reviewed-on: https://go-review.googlesource.com/14472Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dave Cheney authored
Although bnum was being called with a Bits value, a limitation of the escape analyser (golang/go#12588) meant that taking the address of the Bits.b array in the range statement caused the formal parameter to escape to the heap. Passing the a pointer to a Bits, as with all the other Bits helper methods avoids the allocation. Before: BenchmarkBnum1-4 20000000 69.6 ns/op 32 B/op 1 allocs/op After: BenchmarkBnum1-4 100000000 10.1 ns/op 0 B/op 0 allocs/op Change-Id: I673bd57ddc032ee67d09474156d795fb1ba72018 Reviewed-on: https://go-review.googlesource.com/14501Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Fixes #12578. Change-Id: I257d70a67609463e24936bc1739285da154be2fe Reviewed-on: https://go-review.googlesource.com/14531Reviewed-by: Rob Pike <r@golang.org>
-
- 11 Sep, 2015 9 commits
-
-
Michal Bohuslávek authored
The current version of go/printer formats the following code like this: foo.Bar(). Run(func() { do() }). Set(map[string]interface{}{ "x": "three", "y": 4, }). Run( func() { do() }, ) This CL changes the go/printer behaviour to make the code look like this. foo.Bar(). Run(func() { do() }). Set(map[string]interface{}{ "x": "three", "y": 4, }). Run( func() { do() }, ) Fixes #12066. Change-Id: If0f525dae1a5d45f9ba40534dbb65715d7e8001b Reviewed-on: https://go-review.googlesource.com/13928Reviewed-by: Robert Griesemer <gri@golang.org>
-
Rob Pike authored
Fixes #11626. Change-Id: I1b70c0844473c3b57a53d7cca747ea5cdc68d232 Reviewed-on: https://go-review.googlesource.com/14526 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expressions. Caught with gofmt -d -s, fixed with gofmt -w -s Change-Id: I639cfb02b1f57dea4087863df3995889c9371529 Reviewed-on: https://go-review.googlesource.com/13837Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expression. Caught with gofmt -d -s Change-Id: I7f38ef9fb528e2fd284bd0f190fbdf4a91956e55 Reviewed-on: https://go-review.googlesource.com/13834Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expression. Caught with gofmt -d -s, fixed with gofmt -w -s Change-Id: I4472c6003cf66e65f6e69050872ff95c96f01253 Reviewed-on: https://go-review.googlesource.com/13836Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expressions. Caught with gofmt -d -s, fixed with gofmt -w -s Checked that the result can still be compiled with Go 1.4. Change-Id: I06bce110bb5f46ee2f45113681294475aa6968bc Reviewed-on: https://go-review.googlesource.com/13839Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expressions. Caught with gofmt -d -s, fixed with gofmt -w -s Checked that the result can still be compiled with Go 1.4. Change-Id: I201cd90fdfb8de2971c46ad7fce64111152b697e Reviewed-on: https://go-review.googlesource.com/13832Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Rob Pike authored
One (12466) was an actual logic error, backing up when there was nothing there. The others were due to continuing to process an instruction when it cannot work. Methodically stop assembling an instruction when it's not going to succeed. Fixes #12466. Fixes #12467. Fixes #12468. Change-Id: I88c568f2b9c1a8408043b2ac5a78f5e2ffd62abd Reviewed-on: https://go-review.googlesource.com/14498Reviewed-by: Andrew Gerrand <adg@golang.org>
-
alexander demakin authored
If comment of the archive contains data which looks like a zip64 directory, the comment is parsed as an actual directory header. Commit adds some additional checks similar to the checks in minizip library. Fixes #12449 Change-Id: Ia0fc950e47b9c39f77d88401b9ca30100ca7c808 Reviewed-on: https://go-review.googlesource.com/14433 Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 10 Sep, 2015 10 commits
-
-
Shenghou Ma authored
cmd/dist will re-exec itself to detect VFP support at run-time. Fixes #9732, #12548. Change-Id: I9ad0c5c7fa3e97bd79a32da372e1a962565bb3af Reviewed-on: https://go-review.googlesource.com/3973Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Change-Id: I3d37391af2089881a5bd4d8f3e5d434b279c272e Reviewed-on: https://go-review.googlesource.com/14490Reviewed-by: Chris Manghane <cmang@golang.org>
-
Brad Fitzpatrick authored
It was correct for an early version of the CL which introduced the type, but later versions of the CL changed the behavior without updating the documentation. Fixes #12568 Change-Id: Ia4090a02ba122e9f8317ed86c4c9839ae2c539e0 Reviewed-on: https://go-review.googlesource.com/14496Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expressions. Caught with gofmt -d -s, fixed with gofmt -w -s Checked that the result can still be compiled with Go 1.4. Change-Id: I0a6773d12200a7b43491f25f914335069a1fa5e8 Reviewed-on: https://go-review.googlesource.com/13833Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Fixes #12531. Change-Id: I66dc7ac1b71b8f72b4a8f3ec18befa2607ef358b Reviewed-on: https://go-review.googlesource.com/14494Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
Change-Id: Ie86b703407f0f655a4552dd6e03df5f263be43db Reviewed-on: https://go-review.googlesource.com/14492Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
The construction fmt.Printf("%*d", n, 4) reads the argument n as a width specifier to use when printing 4. Until now, only strict int type was accepted here and it couldn't be fixed because the fix, using reflection, broke escape analysis and added an extra allocation in every Printf call, even those that do not use this feature. The compiler has been fixed, although I am not sure when exactly, so let's fix Printf and then write Fixes #10732. Change-Id: I79cf0c4fadd876265aa39d3cb62867247b36ab65 Reviewed-on: https://go-review.googlesource.com/14491Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
In Parse, one can now say Feb 31 or even Feb 99. This is easy to explain, consistent with time.Date, and even maybe useful. Fixes #12333. Fixes #7268. (By disagreeing with it.) Change-Id: I7b95c842528bed66933681c8b9cc00640fccfcb4 Reviewed-on: https://go-review.googlesource.com/14123Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Konstantin Shaposhnikov authored
Updates #11241 Change-Id: I0614c5a9a7a4c399ad5d664f36c70c3210911905 Reviewed-on: https://go-review.googlesource.com/14356Reviewed-by: Robert Griesemer <gri@golang.org>
-
Michael Hudson-Doyle authored
this leaves lots of cruft behind, will delete that soon Change-Id: I12d6b6192f89bcdd89b2b0873774bd3458373b8a Reviewed-on: https://go-review.googlesource.com/14196Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-