- 02 Oct, 2015 3 commits
-
-
David Crawshaw authored
Change-Id: Ic22597b5e2824cffe9598cb9b506af3426c285fd Reviewed-on: https://go-review.googlesource.com/12412 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Issue #12552 can happen on ppc64 too, although much less frequently in my testing. I'm fairly sure this fixes it (2 out of 200 runs of oracle.test failed without this change and 0 of 200 failed with it). It's also a lot faster for large moves/clears: name old speed new speed delta Memmove1-6 157MB/s ± 9% 144MB/s ± 0% -8.20% (p=0.004 n=10+9) Memmove2-6 281MB/s ± 1% 249MB/s ± 1% -11.53% (p=0.000 n=10+10) Memmove3-6 376MB/s ± 1% 328MB/s ± 1% -12.64% (p=0.000 n=10+10) Memmove4-6 475MB/s ± 4% 345MB/s ± 1% -27.28% (p=0.000 n=10+8) Memmove5-6 540MB/s ± 1% 393MB/s ± 0% -27.21% (p=0.000 n=10+10) Memmove6-6 609MB/s ± 0% 423MB/s ± 0% -30.56% (p=0.000 n=9+10) Memmove7-6 659MB/s ± 0% 468MB/s ± 0% -28.99% (p=0.000 n=8+10) Memmove8-6 705MB/s ± 0% 1295MB/s ± 1% +83.73% (p=0.000 n=9+9) Memmove9-6 740MB/s ± 1% 1241MB/s ± 1% +67.61% (p=0.000 n=10+8) Memmove10-6 780MB/s ± 0% 1162MB/s ± 1% +48.95% (p=0.000 n=10+9) Memmove11-6 811MB/s ± 0% 1180MB/s ± 0% +45.58% (p=0.000 n=8+9) Memmove12-6 820MB/s ± 1% 1073MB/s ± 1% +30.83% (p=0.000 n=10+9) Memmove13-6 849MB/s ± 0% 1068MB/s ± 1% +25.87% (p=0.000 n=10+10) Memmove14-6 877MB/s ± 0% 911MB/s ± 0% +3.83% (p=0.000 n=10+10) Memmove15-6 893MB/s ± 0% 922MB/s ± 0% +3.25% (p=0.000 n=10+9) Memmove16-6 897MB/s ± 1% 2418MB/s ± 1% +169.67% (p=0.000 n=10+9) Memmove32-6 908MB/s ± 0% 3927MB/s ± 2% +332.64% (p=0.000 n=10+8) Memmove64-6 1.11GB/s ± 0% 5.59GB/s ± 0% +404.64% (p=0.000 n=9+9) Memmove128-6 1.25GB/s ± 0% 6.71GB/s ± 2% +437.49% (p=0.000 n=9+10) Memmove256-6 1.33GB/s ± 0% 7.25GB/s ± 1% +445.06% (p=0.000 n=10+10) Memmove512-6 1.38GB/s ± 0% 8.87GB/s ± 0% +544.43% (p=0.000 n=10+10) Memmove1024-6 1.40GB/s ± 0% 10.00GB/s ± 0% +613.80% (p=0.000 n=10+10) Memmove2048-6 1.41GB/s ± 0% 10.65GB/s ± 0% +652.95% (p=0.000 n=9+10) Memmove4096-6 1.42GB/s ± 0% 11.01GB/s ± 0% +675.37% (p=0.000 n=8+10) Memclr5-6 269MB/s ± 1% 264MB/s ± 0% -1.80% (p=0.000 n=10+10) Memclr16-6 600MB/s ± 0% 887MB/s ± 1% +47.83% (p=0.000 n=10+10) Memclr64-6 1.06GB/s ± 0% 2.91GB/s ± 1% +174.58% (p=0.000 n=8+10) Memclr256-6 1.32GB/s ± 0% 6.58GB/s ± 0% +399.86% (p=0.000 n=9+10) Memclr4096-6 1.42GB/s ± 0% 10.90GB/s ± 0% +668.03% (p=0.000 n=8+10) Memclr65536-6 1.43GB/s ± 0% 11.37GB/s ± 0% +697.83% (p=0.000 n=9+8) GoMemclr5-6 359MB/s ± 0% 360MB/s ± 0% +0.46% (p=0.000 n=10+10) GoMemclr16-6 750MB/s ± 0% 1264MB/s ± 1% +68.45% (p=0.000 n=10+10) GoMemclr64-6 1.17GB/s ± 0% 3.78GB/s ± 1% +223.58% (p=0.000 n=10+9) GoMemclr256-6 1.35GB/s ± 0% 7.47GB/s ± 0% +452.44% (p=0.000 n=10+10) Update #12552 Change-Id: I7192e9deb9684a843aed37f58a16a4e29970e893 Reviewed-on: https://go-review.googlesource.com/14840Reviewed-by: Minux Ma <minux@golang.org>
-
Mikio Hara authored
This change splits signal_unix.go into signal_unix.go and signal2_unix.go and removes the fake symbol sigfwd from signal forwarding unsupported platforms for clarification purpose. Change-Id: I205eab5cf1930fda8a68659b35cfa9f3a0e67ca6 Reviewed-on: https://go-review.googlesource.com/12062Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 01 Oct, 2015 9 commits
-
-
Joe Tsai authored
If the stream is in an inconsistent state, it does not make sense that Reader.Read can be called and possibly succeed. Change-Id: I9d1c5a1300b2c2b45232188aa7999e350809dcf2 Reviewed-on: https://go-review.googlesource.com/15177Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Burcu Dogan authored
The native Go host resolver was behaving differently than libc and the entries in the /etc/hosts were handled in a case sensitive way. In order to be compatible with libc's resolver, /etc/hosts lookups must be case-insensitive. Fixes #12806. Change-Id: I3c14001abffadf7458fd1a027c91e6438a87f285 Reviewed-on: https://go-review.googlesource.com/15321 Run-TryBot: Burcu Dogan <jbd@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alan Donovan authored
Change-Id: Ibd24e1567cb03f7f00f3cbe381bedd6c5215af35 Reviewed-on: https://go-review.googlesource.com/15320Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
David Chase authored
The existing test did not take into account the implicit dereference of &fixedArray and thus heap-escaped when it was not necessary. Also added a detailed test for this and related cases. Fixes #12588 Change-Id: I951e9684a093082ccdca47710f69f4366bd6b3cf Reviewed-on: https://go-review.googlesource.com/15130Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Joel Sing authored
Reduce allocation to avoid running out of memory on the openbsd/arm builder, until issue/12032 is resolved. Update issue #12032 Change-Id: Ibd513829ffdbd0db6cd86a0a5409934336131156 Reviewed-on: https://go-review.googlesource.com/15242Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Joel Sing authored
sysReserve will return nil on failure - correctly handle this case and return nil to the caller. Currently, a failure will result in h.arena_end being set to psize, h.arena_used being set to zero and fun times ensue. On the openbsd/arm builder this has resulted in: runtime: address space conflict: map(0x0) = 0x40946000 fatal error: runtime: address space conflict When it should be reporting out of memory instead. Change-Id: Iba828d5ee48ee1946de75eba409e0cfb04f089d4 Reviewed-on: https://go-review.googlesource.com/15056Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Jeremy Schlatter authored
Change-Id: I8f22434ade576cc7e3e6d9f357bba12c1296e3d1 Reviewed-on: https://go-review.googlesource.com/15250Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Symonds authored
This is a follow-up to a326c3e1 to avoid reflect being in the API. Fixes #12801. Change-Id: Ic4c2e592e2c35b5911f75d88f1d9c44787c80f30 Reviewed-on: https://go-review.googlesource.com/15240 Run-TryBot: David Symonds <dsymonds@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Joe Tsai authored
The sparseFileReader is prone to two different forms of denial-of-service attacks: * A malicious tar file can cause an infinite loop * A malicious tar file can cause arbitrary panics This results because of poor error checking/handling, which this CL fixes. While we are at it, add a plethora of unit tests to test for possible malicious inputs. Change-Id: I2f9446539d189f3c1738a1608b0ad4859c1be929 Reviewed-on: https://go-review.googlesource.com/15115Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 30 Sep, 2015 10 commits
-
-
Joe Tsai authored
Reader failed to detect truncated streams since calls to io.ReadFull did not check if the error is io.EOF. Change-Id: I86c497519daaaccefc6eb5617ddcd8fd3b99f51b Reviewed-on: https://go-review.googlesource.com/14835Reviewed-by: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
The memory sanitizer (msan) is a nice compiler feature that can dynamically check for memory errors in C code. It's not useful for Go code, since Go is memory safe. But it is useful to be able to use the memory sanitizer on C code that is linked into a Go program via cgo. Without this change it does not work, as msan considers memory passed from Go to C as uninitialized. To make this work, change the runtime to call the C mmap function when using cgo. When using msan the mmap call will be intercepted and marked as returning initialized memory. Work around what appears to be an msan bug by calling malloc before we call mmap. Change-Id: I8ab7286d7595ae84782f68a98bef6d3688b946f9 Reviewed-on: https://go-review.googlesource.com/15170 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Joe Tsai authored
Also add a unit test to lock this behavior into the API. Fixes #12016 Change-Id: Ib6ec6e7948f0705f3504ede9143b5dc4e790fc44 Reviewed-on: https://go-review.googlesource.com/15171Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
We've broken periodic GC a few times without noticing because there's no test for it, partly because you have to wait two minutes to see if it happens. This exposes control of the periodic GC timeout to runtime tests and adds a test that cranks it down to zero and sleeps for a bit to make sure periodic GCs happen. Change-Id: I3ec44e967e99f4eda752f85c329eebd18b87709e Reviewed-on: https://go-review.googlesource.com/13169Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com>
-
Robert Griesemer authored
Applied identical change to cmd/gofmt/internal.go. Fixes #11275. Change-Id: Icb4bf0460c94c9e2830dd0d62c69376774cbda30 Reviewed-on: https://go-review.googlesource.com/15154Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Fixes #11844. Change-Id: I32edd39e79f7c9bdc132c49bd06081f35dac245d Reviewed-on: https://go-review.googlesource.com/15114Reviewed-by: Alan Donovan <adonovan@google.com>
-
Adam Langley authored
The format for a CSR is horribly underspecified and we had a mistake. The code was parsing the attributes from the CSR as a pkix.AttributeTypeAndValueSET, which is only almost correct: it works so long as the requested extensions don't contain the optional “critical” flag. Unfortunately this mistake is exported somewhat in the API and the Attributes field of a CSR actually has the wrong type. I've moved this field to the bottom of the structure and updated the comment to reflect this. The Extensions and other fields of the CSR structure can be saved however and this change does that. Fixes #11897. Change-Id: If8e2f5c21934800b72b041e38691efc3e897ecf1 Reviewed-on: https://go-review.googlesource.com/12717Reviewed-by: Rob Pike <r@golang.org>
-
Adam Langley authored
Platform-specific verification needs the ASN.1 contents of a certificate but that might not be provided if the Certificate was not created by ParseCertificate. In order to avoid a panic on Windows, and to make behaviour consistent across platforms, this change causes verification to fail when the ASN.1 contents of a certificate are not available. Fixes #12184 Change-Id: I4395d74934e675c179eaf4cded1094a756e478bb Reviewed-on: https://go-review.googlesource.com/14053Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
As akalin points out in the bug, the comment previously claimed that the probability that the input is prime given that the function returned true is 1 - ¼ⁿ. But that's wrong: the correct statement is that the probability of the function returning false given a composite input is 1 - ¼ⁿ. This is not nearly as helpful, but at least it's truthful. A number of other (correct) expressions are suggested on the bug, but I think that the simplier one is preferable. This change also notes that the function is not suitable for adversarial inputs since it's deterministic. Fixes #12274. Change-Id: I6a0871d103b126ee5a5a922a8c6993055cb7b1ed Reviewed-on: https://go-review.googlesource.com/14052Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
This change causes the types of skipped PEM blocks to be recorded when no certificate or private-key data is found in a PEM input. This allows for better error messages to be return in the case of common errors like switching the certifiate and key inputs to X509KeyPair. Fixes #11092 Change-Id: Ifc155a811cdcddd93b5787fe16a84c972011f2f7 Reviewed-on: https://go-review.googlesource.com/14054Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 29 Sep, 2015 9 commits
-
-
Robert Griesemer authored
This is a copy of x/tools/cmd/gotype/gotype.go with the corresponding x/tools/cmd/gotype/doc.go prepended and including a build tag (ignore). This way, go/types can be built unaffected. If we need the gotype command, it is trivially built in the go/types directory with: go build gotype.go . Fixes #12303. Change-Id: I2d792fcb39719cc5cc300f657e4735901cd20faa Reviewed-on: https://go-review.googlesource.com/15152Reviewed-by: Rob Pike <r@golang.org>
-
Robert Griesemer authored
For #12787. Change-Id: I921d01c8d7d97f3453b25e6d2241a43c5d64f53b Reviewed-on: https://go-review.googlesource.com/15150Reviewed-by: Alan Donovan <adonovan@google.com>
-
Russ Cox authored
(Changed modified by bradfitz from original rsc version) Change-Id: I8ea40044c325f333a13d48b59b4795b02c579533 Reviewed-on: https://go-review.googlesource.com/14026Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Håvard Haugen authored
Inlined the last occurrence of stringsCompare into exprcmp. Passes go build -a -toolexec 'toolstash -cmp' std cmd. Change-Id: I8fd99e3fbffc84283cc269368595cba950533066 Reviewed-on: https://go-review.googlesource.com/14872Reviewed-by: Dave Cheney <dave@cheney.net> Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rob Pike authored
The code to strip GOROOT and GOPATH had a bug: it assumed there were bytes after the GOROOT prefix but there might not be. Fix this and other issues by taking care the prefix is really a file name prefix for the path, not just a string prefix, and handle the case where GOROOT==path. Change-Id: I8066865fd05f938bb6dbf3bb8ab1fc58e5cf6bb5 Reviewed-on: https://go-review.googlesource.com/15112 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Robert Griesemer authored
Good enough for now. Fixes #11241. Change-Id: Ieb50809f104d20bcbe14daecac503f72486bec92 Reviewed-on: https://go-review.googlesource.com/15111Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
- more uniform naming - test sign more deliberately - remove superfluous test (JSON encoder always uses the JSON marshaler if present) Change-Id: I37b1e367c01fc8bae1e06adbdb72dd366c08d5ce Reviewed-on: https://go-review.googlesource.com/15110Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Fixes #12256. Change-Id: Ie4a3337996da5c060b27530b076048ffead85f3b Reviewed-on: https://go-review.googlesource.com/15040Reviewed-by: Alan Donovan <adonovan@google.com>
-
Andrew Gerrand authored
Change-Id: I004a43842430201296363a9745480bee94920041 Reviewed-on: https://go-review.googlesource.com/15084Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 28 Sep, 2015 7 commits
-
-
Andrew Gerrand authored
Change-Id: Ide82ac98dc7cb1035ceb9d461ed95af899f8f983 Reviewed-on: https://go-review.googlesource.com/15081Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Robert Griesemer authored
Change-Id: I63da54832548c325e47dc54aaa5b5112e1f3b3ba Reviewed-on: https://go-review.googlesource.com/15048Reviewed-by: Rob Pike <r@golang.org>
-
Robert Griesemer authored
- moved existing package documentation from nat.go to doc.go - expanded on it For #11241. Change-Id: Ie75a2b0178a8904a4154307a1f5080d7efc5489a Reviewed-on: https://go-review.googlesource.com/15042Reviewed-by: Alan Donovan <adonovan@google.com>
-
Rob Pike authored
Main change is that the comment for an item no longer has a blank line before it, so it looks bound to the item it's about. Motivating example: go doc.io.read changes from < func (l *LimitedReader) Read(p []byte) (n int, err error) func (r *PipeReader) Read(data []byte) (n int, err error) Read implements the standard Read interface: it reads data from the pipe, blocking until a writer arrives or the write end is closed. If the write end is closed with an error, that error is returned as err; otherwise err is EOF. func (s *SectionReader) Read(p []byte) (n int, err error) > to < func (l *LimitedReader) Read(p []byte) (n int, err error) func (r *PipeReader) Read(data []byte) (n int, err error) Read implements the standard Read interface: it reads data from the pipe, blocking until a writer arrives or the write end is closed. If the write end is closed with an error, that error is returned as err; otherwise err is EOF. func (s *SectionReader) Read(p []byte) (n int, err error) > Now the comment about PipeReader.Read doesn't look like it's about SectionReader. Based on a suggestion by dsnet@, a slight tweak from a CL he suggested and abandoned. Fixes #12756, Change-Id: Iaf60ee9ae7f644c83c32d5e130acab0312b0c926 Reviewed-on: https://go-review.googlesource.com/14999Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Andrew Gerrand authored
This change adds a new "block" keyword that permits the definition of templates inline inside existing templates, and loosens the restriction on template redefinition. Templates may now be redefined, but in the html/template package they may only be redefined before the template is executed (and therefore escaped). The intention is that such inline templates can be redefined by subsequent template definitions, permitting a kind of template "inheritance" or "overlay". (See the example for details.) Fixes #3812 Change-Id: I733cb5332c1c201c235f759cc64333462e70dc27 Reviewed-on: https://go-review.googlesource.com/14005Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
When exporting a function using gccgo, we generate two functions: a Go function with a leading Cgoexp_ prefix, and a C function that calls the Go function. The Go function has a name that can not be represented in C, so the C code needs a declaration with an __asm__ qualifier giving the name of the Go function. Before this CL we put that declaration in the exported header file. Because code would sometimes #include "_cgo_export.h", we added a macro definition for the C function giving it the name of the declaration. We then added a macro undefine in the actual C code, so that we could declare the C function we wanted. This rounadabout process worked OK until we started exporting the header file for use with -buildmode=c-archive and c-shared. Doing that caused the code to see the define and thus call the Go function rather than the C function. That often works fine, but the C function calls _cgo_wait_runtime_init_done before calling the Go function, and that sometimes matters. This didn't show up in tests because we don't test using gccgo. That is something we should fix, but not now. Fix that by simplifying the code to declare the C function in the header file as one would expect, and move the __asm__ declaration to the C code. Change-Id: I33547e028152ff98e332630994b4f33285feec32 Reviewed-on: https://go-review.googlesource.com/15043Reviewed-by: Minux Ma <minux@golang.org>
-
Joel Sing authored
As detailed in #11910, the current implementation attempts to execute an area of memory with unknown content. If the memory is executable, the result is unpredictable - instead, make the test deterministic by attempting to execute an instruction that is known to trigger a trap on the given architecture. The new implementation is written by iant@ and provided via #11910. Update issue #11910 Change-Id: Ia698c36e0dd98a9d9d16a701f60f6748c6faf896 Reviewed-on: https://go-review.googlesource.com/15058 Run-TryBot: Joel Sing <jsing@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 27 Sep, 2015 2 commits
-
-
Didier Spezia authored
As stated in FastCGI specifications: FastCGI transmits a name-value pair as the length of the name, followed by the length of the value, followed by the name, followed by the value. The current implementation trusts the name and value length provided in the record, leading to a panic if the record is malformed. Added an explicit check on the lengths. Test case and fix suggested by diogin@gmail.com (Jingcheng Zhang) Fixes #11824 Change-Id: I883a1982ea46465e1fb02e0e02b6a4df9e529ae4 Reviewed-on: https://go-review.googlesource.com/15015Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Joel Sing authored
openbsd/arm does not support external linking - skip the note reading test that uses linkmode external on this platform. While here, cleanup the code and consistently use t.Skipf for all platforms that cannot run this test. Change-Id: I64f0d9e038bc4c993c3d843fc069a0b723a924d6 Reviewed-on: https://go-review.googlesource.com/15054Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-