- 21 Oct, 2015 15 commits
-
-
Ian Lance Taylor authored
Add explicit memory sanitizer instrumentation to the runtime and syscall packages. The compiler does not instrument the runtime package. It does instrument the syscall package, but we need to add a couple of cases that it can't see. Change-Id: I2d66073f713fe67e33a6720460d2bb8f72f31394 Reviewed-on: https://go-review.googlesource.com/16164Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Matthew Dempsky authored
Allows removing a few gratuitous unsafe.Pointer conversions and parallels the type of reflect.funcType's in and out fields ([]*rtype). Change-Id: Ie5ca230a94407301a854dfd8782a3180d5054bc4 Reviewed-on: https://go-review.googlesource.com/16163 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Hyang-Ah Hana Kim authored
The earlier calls to test(false) in TestDependencies were removed by https://golang.org/cl/12576 Change-Id: If5c7994172379c2d7f633d2e9c5261e668c754fa Reviewed-on: https://go-review.googlesource.com/16117Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Hyang-Ah Hana Kim authored
unix/unixgram is not available to standard Android programs. For golang/go#10807 Change-Id: I6062c3a25cffb86e58cbbd12a07dc90ffbf57185 Reviewed-on: https://go-review.googlesource.com/16114Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
These are the runtime support functions for letting Go code interoperate with the C/C++ memory sanitizer. Calls to msanread/msanwrite are now inserted by the compiler with the -msan option. Calls to msanmalloc/msanfree will be from other runtime functions in a subsequent CL. Change-Id: I64fb061b38cc6519153face242eccd291c07d1f2 Reviewed-on: https://go-review.googlesource.com/16162 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Change-Id: Ie94cd17e1975fdaaa418fa6a7b2d3b164fedc135 Reviewed-on: https://go-review.googlesource.com/16057Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
The ragged barrier after entering the concurrent mark phase is vestigial. This used to be the point where we enabled write barriers, so it was necessary to synchronize all Ps to ensure write barriers were enabled before any marking occurred. However, we've long since switched to enabling write barriers during the concurrent scan phase, so the start-the-world at the beginning of the concurrent scan phase ensures that all Ps have enabled the write barrier. Hence, we can eliminate the old "install write barrier" phase. Fixes #11971. Change-Id: I8cdcb84b5525cef19927d51ea11ba0a4db991ea8 Reviewed-on: https://go-review.googlesource.com/16044Reviewed-by: Rick Hudson <rlh@golang.org>
-
Ian Lance Taylor authored
The -msan option causes the compiler to add instrumentation for the C/C++ memory sanitizer. Every memory read/write will be preceded by a call to msanread/msanwrite. This CL passes tests but is not usable by itself. The actual implementation of msanread/msanwrite in the runtime package, and support for -msan in the go tool and the linker, and tests, will follow in subsequent CLs. Change-Id: I3d517fb3e6e65d9bf9433db070a420fd11f57816 Reviewed-on: https://go-review.googlesource.com/16160Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Ian Lance Taylor authored
The -msan option causes the linker to link against the runtime/msan package in order to use the C/C++ memory sanitizer. This CL passes tests but is not usable by itself. The actual runtime/msan package, and support for -msan in the go tool and the compiler, and tests, are in separate CLs. Change-Id: I02c097393b98c5b80e40ee3dbc167a8b4d23efe0 Reviewed-on: https://go-review.googlesource.com/16161 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Konstantin Shaposhnikov authored
This change fixes shadow assignment check in cases when RHS is not an identifier or a type assertion. Fixes #12188 Change-Id: I0940df8d9c237ab8b8d3272eb6895e676c75c115 Reviewed-on: https://go-review.googlesource.com/16038Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
This is mechanical change that is a step toward reusing the racewalk pass for a more general instrumentation pass. The first use will be to add support for the memory sanitizer. Change-Id: I75b93b814ac60c1db1660e0b9a9a7d7977d86939 Reviewed-on: https://go-review.googlesource.com/16105Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Nodir Turakulov authored
packagesAndErrors function doesn't dedup packages. As a result, `go list io ./io` prints io package twice. Same applies to `go build` and `go test`. * dedup packages. * add a test for go list Change-Id: I54d4063979b1c9359e5416e12327cb85c4823a0f Reviewed-on: https://go-review.googlesource.com/16136 Run-TryBot: Andrew Gerrand <adg@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Aaron Jacobs authored
Change-Id: I7a85c0ad8aba2d50032c8faa58c83fb327f360cf Reviewed-on: https://go-review.googlesource.com/16140Reviewed-by: Andrew Gerrand <adg@golang.org>
-
acanino authored
Small fix: looks like a short variable declaration with a type switch checks to make sure the variable used had valid shape (ONAME, OTYPE, or ONONAME) and rejects everything else. Then a new variable is declared. If the symbol contained in the declaration was a named OLITERAL (still a valid identifier obviously) it would be rejected, even though a new variable would have been declared. Fix adds this case to the check. Added a test case from issue12413. Fixes #12413 Change-Id: I150dadafa8ee5612c867d58031027f2dca8c6ebc Reviewed-on: https://go-review.googlesource.com/15760Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Updates to x/net git revision 9946ad7 Change-Id: I95c03daf382667002a5b22f184bd9b7d18144913 Reviewed-on: https://go-review.googlesource.com/16066Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 20 Oct, 2015 19 commits
-
-
Nodir Turakulov authored
template.Clone() initialized template set incorrectly: it didn't include itself. * include itself in template set while cloning * add a test Fixes #12996 Change-Id: I932530e4f7f1bbebf833e12b000a5ce052bc9223 Reviewed-on: https://go-review.googlesource.com/16104Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
In https://golang.org/cl/15860 http2.ConfigureServer was changed to return an error if explicit CipherSuites are listed and they're not compliant with the HTTP/2 spec. This is the net/http side of the change, to look at the return value from ConfigureServer and propagate it in Server.Serve. h2_bundle.go will be updated in a future CL. There are too many other http2 changes pending to be worth updating it now. Instead, h2_bundle.go is minimally updated by hand in this CL so at least the net/http change will compile. Updates #12895 Change-Id: I4df7a097faff2d235742c2d310c333bd3fd5c08e Reviewed-on: https://go-review.googlesource.com/16065Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Instead of open-coding conversions from *string to unsafe.Pointer then to *stringStruct, add a helper function to add some type safety. Bonus: This caught two **string values being converted to *stringStruct in heapdump.go. While here, get rid of the redundant _string type, but add in a stringStructDWARF type used for generating DWARF debug info. Change-Id: I8882f8cca66ac45190270f82019a5d85db023bd2 Reviewed-on: https://go-review.googlesource.com/16131 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Aaron Jacobs authored
The '1' part is left over from the C conversion, but no longer makes sense given that print1.go no longer exists. Change-Id: Iec171251370d740f234afdbd6fb1a4009fde6696 Reviewed-on: https://go-review.googlesource.com/16036Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Hyang-Ah Hana Kim authored
Same reason as https://go-review.googlesource.com/#/c/16115/ For golang/go#10807 Change-Id: Id0c404e9feb963f39a111fc317c9787692516ae1 Reviewed-on: https://go-review.googlesource.com/16116Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Hyang-Ah Hana Kim authored
Creating symlinks (/data/local/tmp/*) doesn't seem to work on android-L (tested on nexus5). I cannot find any official documentation yet but just guess it's a measure for security attacks using symlinks. The tests failed with 'permission denied' errors. For golang/go#10807 Change-Id: I99a9c401c6ecca3c4adc7b21708adaf3dd601279 Reviewed-on: https://go-review.googlesource.com/16115Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Fixes #12577. Change-Id: Id469cd92f5f9436b0ef948ee1a252ed1842bc7aa Reviewed-on: https://go-review.googlesource.com/16133 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
The proper term is "untyped boolean". Change-Id: Id871164190a03c64a8a8987b1ad5d8653a21d96e Reviewed-on: https://go-review.googlesource.com/16135Reviewed-by: Robert Griesemer <gri@golang.org>
-
Caleb Spare authored
Additionally, add a test for CTR mode to cover a range of block sizes. Fixes #12975 Change-Id: I458aac1616228747e62f92f823768d55e874877a Reviewed-on: https://go-review.googlesource.com/16050Reviewed-by: Adam Langley <agl@golang.org>
-
Robert Griesemer authored
The spec defines precise numeric constants which do not overflow. Consequently, +/-Inf and NaN values were excluded. The case was not clear for -0.0 but they are mostly of interest to determine the sign of infinities which don't exist. That said, the conversion rules explicitly say that T(x) (for a numeric x and floating-point type T) is the value after rounding per IEEE-754. The result is constant if x is constant. Rounding per IEEE-754 can produce a -0.0 which we cannot represent as a constant. Thus, the spec is inconsistent. Attempt to fix the inconsistency by adjusting the rounding rule rather than letting -0.0 into the language. For more details, see the issue below. Open to discussion. Fixes #12576. Change-Id: Ibe3c676372ab16d9229f1f9daaf316f761e074ee Reviewed-on: https://go-review.googlesource.com/14727Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
Change-Id: I0ad7836c0e8d70ffdc458e125d97b01e85d8a608 Reviewed-on: https://go-review.googlesource.com/16130Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Hyang-Ah Hana Kim authored
access, connect, socket. In Android-L, logging is done by writing the log messages to the logd process through a unix domain socket. Also, changed the arg types of those syscall stubs to match linux programming APIs. For golang/go#10743 Change-Id: I66368a03316e253561e9e76aadd180c2cd2e48f3 Reviewed-on: https://go-review.googlesource.com/15993Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Ilya Tocar authored
Align functions with 0xCC (INT $3) - breakpoint instruction, instead of 0x00, which can disassemble into valid instruction. Change-Id: Ieda191886efc4aacb86f58bea1169fd1b3b57636 Reviewed-on: https://go-review.googlesource.com/16102 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> Reviewed-by: Gregory Shimansky <gregory.shimansky@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
Use a go:norace comment rather than having the compiler know the special name syscall.forkAndExecInChild. Change-Id: I69bc6aa6fc40feb2148d23f269ff32453696fb28 Reviewed-on: https://go-review.googlesource.com/16097Reviewed-by: Minux Ma <minux@golang.org>
-
Aaron Jacobs authored
When I saw that it was labelled "legacy", I went looking for users of it to see how it was still used. But there aren't any. Save the next person the trouble. Change-Id: I921dd6c57b60331c9816542272555153ac133c02 Reviewed-on: https://go-review.googlesource.com/16035Reviewed-by: Dave Cheney <dave@cheney.net> Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Thorben Krueger authored
For printing, the format verb '%X' results in a capitalized hex-representation of the formatted value. Conversely, using '%X' in a Scanf function should scan a hex-representation into the given interface{}. The existing implementation however only supports '%X' for scanning hex values into integers; strings or byte slices remain empty. On the other hand, lower-case '%x' supports strings and byte slices just fine. This is merely an oversight, which this commit fixes. (Additional tests also included.) Fixes #12940 Change-Id: I178a7f615bae950dfc014ca8c0a038448cf0452a Reviewed-on: https://go-review.googlesource.com/15689Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Nodir Turakulov authored
* detect Content-Type on ReponseRecorder.Write[String] call if header wasn't written yet, Content-Type header is not set and Transfer-Encoding is not set. * fix typos in serve_test.go Updates #12986 Change-Id: Id2ed8b1994e64657370fed71eb3882d611f76b31 Reviewed-on: https://go-review.googlesource.com/16096Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
This is the start of wiring up the HTTP/2 Transport. It is still disabled in this commit. This change does two main things: 1) Transport.RegisterProtocol now permits registering "http" or "https" (they previously paniced), and the semantics of the registered RoundTripper have been extended to say that the new sentinel error value (ErrSkipAltProtocol, added in this CL) means that the Transport's RoundTrip method proceeds as if the alternate protocol had not been registered. This gives us a place to register an alternate "https" RoundTripper which gets first dibs on using HTTP/2 if there's already a cached connection. 2) adds Transport.TLSNextProto, a map keyed by TLS NPN/ALPN protocol strings, similar in feel to the existing Server.TLSNextProto map. This map is the glue between the HTTP/1 and HTTP/2 clients, since we don't know which protocol we're going to speak (and thus which Transport type to use) until we've already made the TCP connection. Updates #6891 Change-Id: I7328c7ff24f52d9fe4899facabf7ecc5dcb989f3 Reviewed-on: https://go-review.googlesource.com/16090Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
With this CL, httptest.Server now uses connection-level accounting of outstanding requests instead of ServeHTTP-level accounting. This is more robust and results in a non-racy shutdown. This is much easier now that net/http.Server has the ConnState hook. Fixes #12789 Fixes #12781 Change-Id: I098cf334a6494316acb66cd07df90766df41764b Reviewed-on: https://go-review.googlesource.com/15151Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 19 Oct, 2015 6 commits
-
-
Ian Lance Taylor authored
Just a comment change reflecting that the files were moved to the builtin directory when the compiled was converted from C to Go. Change-Id: I65e5340c09221684e40174feadfb69f738a9044a Reviewed-on: https://go-review.googlesource.com/16089Reviewed-by: Minux Ma <minux@golang.org>
-
Burcu Dogan authored
This CL keeps disallowing `go get` from falling to the prompt unless user has set GIT_TERMINAL_PROMPT env variable. If GIT_TERMINAL_PROMPT is set, go-get will not override its value and will prompt for username/password in the case of GIT_TERMINAL_PROMPT=1. Fixes #12706. Change-Id: Ibd6b1100af6b04fb8114279cdcf608943e7765be Reviewed-on: https://go-review.googlesource.com/16091Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Nodir Turakulov authored
Change-Id: Iaf33fae7043f21df2dba0bb7e1addb0ff002c508 Reviewed-on: https://go-review.googlesource.com/16088Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Hudson-Doyle authored
Building Go shared libraries requires that all functions that have declarations without bodies have implementations and vice versa, so remove the implementation of call16 and add a stub implementation of sigreturn. Change-Id: I4d5a30c8637a5da7991054e151a536611d5bea46 Reviewed-on: https://go-review.googlesource.com/15966Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Shared libraries on ppc64le will require a larger minimum stack frame (because the ABI mandates that the TOC pointer is available at 24(R1)). Part 2b of preparing for that is to have all the code in the linker that needs to know this size of this call a function to find out. Change-Id: I246363840096db22e44beabbe38b61d60c1f31ad Reviewed-on: https://go-review.googlesource.com/15675Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Only effect is register related: do not allocate R2 or R12, put function entrypoint in R12 before indirect call. Change-Id: I9cdd553bab022601c9cb5bb43c9dc0c368c6fb0a Reviewed-on: https://go-review.googlesource.com/15961Reviewed-by: Ian Lance Taylor <iant@golang.org>
-