summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * runtime: check that Version does not contain \r \nRuss Cox2016-12-051-0/+9
| | | | | | | | | | | | | | | | Change-Id: I8982cfa7337ec457b5235a207ebfda00ef6a2e5a Reviewed-on: https://go-review.googlesource.com/33917 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/compile: find last StoreWB explicitlyCherry Zhang2016-12-054-16/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In writebarrier phase, a chain of StoreWBs is rewritten to branchy code to invoke write barriers, and the last store in the chain is spliced into a Phi op to join the memory of the two branches. We must find the last store explicitly, since the values are not scheduled and they may not come in dependency order. Fixes #18169. Change-Id: If547e3c562ef0669bc5622c1bb711904dc36314d Reviewed-on: https://go-review.googlesource.com/33915 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
| * cmd/go: give useful error when msan isn't supportedDhananjay Nakrani2016-12-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | Fixes #18180. Change-Id: I7006fe6cf08139e5aaaf35412b962a4e82109f59 Reviewed-on: https://go-review.googlesource.com/33898 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * html/template: lock in application/json as valid JS testEmmanuel Odeke2016-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CL https://go-review.googlesource.com/33899 added application/json as a mimeType for valid JS. Let's lock that fix in with a test. Updates #18159 Change-Id: Ic4dfd8929aebfc5410f796688f081ca06630f672 Reviewed-on: https://go-review.googlesource.com/33901 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Nodir Turakulov <nodir@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
| * html/template: escape JS in application/json script tagNodir Turakulov2016-12-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ffd1c781b77aab542713b66ef387fa9307e4060b HTML templates check MIME type in the "type" attribute of "script" tag to decide if contents should be escaped as JavaScript. The whitelist of MIME types did not include application/json. Include it in this CL. Fixes #18159 Change-Id: I17a8a38f2b7789b4b7e941d14279de222eaf2b6a Reviewed-on: https://go-review.googlesource.com/33899 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * cmd/dist: remove special test timeout scale for WindowsBrad Fitzpatrick2016-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://golang.org/cl/33804 I screwed up a GOOS == "windows" check into a bogus comparison against GOARCH == "windows". But turns out the builders are happy anyway, so remove the windows special case. Change-Id: I820b1d49d5b3e8cbffe4516fc39f514326dc39f8 Reviewed-on: https://go-review.googlesource.com/33893 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
| * runtime: skip GDB tests on mips64Brad Fitzpatrick2016-12-031-4/+15
| | | | | | | | | | | | | | | | | | | | Updates #18173 Change-Id: I4c667c89ba3bf16433a4cef7cb01054f1798667d Reviewed-on: https://go-review.googlesource.com/33892 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
| * cmd/go: add missing newline at end of error messageJosh Bleecher Snyder2016-12-031-1/+1
| | | | | | | | | | | | | | | | Change-Id: I9277e869e171d9e051ff9a70ac578b8127fa74f8 Reviewed-on: https://go-review.googlesource.com/33897 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/link: don't overalign ELF reloc sectionsIan Lance Taylor2016-12-022-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internal linking on an ELF system creates two reloc sections, which must be adjacent. The default is to base section alignment on the section size, but doing that for ELF reloc sections can introduce a gap. Set the reloc section alignment explicitly to avoid that. Fixes #18044. Change-Id: I8ccc131e60937d30c5f715a34c7803258833fc2f Reviewed-on: https://go-review.googlesource.com/33872 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * cmd/compile/internal/syntax: remove dead type declarationRobert Griesemer2016-12-021-2/+0
| | | | | | | | | | | | | | | | Change-Id: I8a3ce0fa513ff943009c5669531132cd23ecf155 Reviewed-on: https://go-review.googlesource.com/33870 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * vendor/golang_org/x/crypto/chacha20poly1305: revendor to pick up fix for #18154Shenghou Ma2016-12-021-9/+9
| | | | | | | | | | | | | | | | | | | | Fixes #18154. Change-Id: I1836b63a380b7fc2f9965e909859b1a89a3ae5d5 Reviewed-on: https://go-review.googlesource.com/33856 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * net/http: revert change making NewRequest set ContentLength -1Brad Fitzpatrick2016-12-013-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of NoBody and related body-peeking bug fixes also added a "cleanup" of sorts to make NewRequest set the returned Requests's ContentLength to -1 when it didn't know it. Using -1 to mean unknown is what the documentation says, but then people apparently(?) depended on it being zero so they could do this: req, _ := http.NewRequest("POST", url, someNonNilReaderWithUnkownSize) req.Body = nil res, err := http.DefaultClient.Do(req) ... and expect it to work. After https://golang.org/cl/31445 the contrived(?) code above stopped working, since Body was nil and ContentLength was -1, which has been disallowed since Go 1.0. So this restores the old behavior of NewRequest, not setting it to -1. That part of the fix isn't required as of https://golang.org/cl/31726 (which added NoBody) I still don't know whether this bug is hypothetical or actually affected people in practice. Let's assume it's real for now. Fixes #18117 Change-Id: I42400856ee92a1a4999b5b4668bef97d885fbb53 Reviewed-on: https://go-review.googlesource.com/33801 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
| * cmd/dist: adjust default timeout scale for mipsBrad Fitzpatrick2016-12-011-1/+4
| | | | | | | | | | | | | | | | Per recommendation from imgtec.com folk. Change-Id: I9b6f30572f257acce59842ac55362f52fe36c5ab Reviewed-on: https://go-review.googlesource.com/33804 Reviewed-by: Ian Lance Taylor <iant@golang.org>
| * cmd/go: check MustHaveExternalNetwork before `go get` testsIan Lance Taylor2016-12-011-6/+8
| | | | | | | | | | | | | | | | | | | | | | Also change a couple of `go get` tests to use MustHaveExternalNetwork rather than checking testing.Short. Change-Id: I98ccc05b8b0354f1b7486e28dac5f8341c342a07 Reviewed-on: https://go-review.googlesource.com/33802 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/internal/obj: rename obj.go to line.goMatthew Dempsky2016-12-011-0/+0
| | | | | | | | | | | | | | | | | | | | This file is entirely about the implementation of LineHist, and I can never remember which generic filename in cmd/internal/obj has it. Rename to line.go to match the already existing line_test.go. Change-Id: Id01f3339dc550c9759569d5610d808b17bca44d0 Reviewed-on: https://go-review.googlesource.com/33803 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * database/sql: ensure Commit and Rollback return ErrTxDoneDaniel Theophanes2016-12-012-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Ensure documented behavior of returning ErrTxDone if the Tx has already been committed or rolled back. Fixes #18147 Change-Id: I07dc75bef4dbd4dd88dd252c96dc8ab99f28c00e Reviewed-on: https://go-review.googlesource.com/33793 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/compile: correctly parse //line filename:line where filename contains ':'Robert Griesemer2016-12-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This was a regression from 1.7. See the issue for details. Fixes #18149. Change-Id: Ic8f5a35d14edf9254b1275400316cff7aff32a27 Reviewed-on: https://go-review.googlesource.com/33799 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * net/http: teach NewRequest that NoBody has ContentLength zeroBrad Fitzpatrick2016-12-012-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | NoBody is new in Go 1.8. Found while investigating #18117 Change-Id: I6bda030f358e2270f090d108cb3a89c8a2665fcb Reviewed-on: https://go-review.googlesource.com/33714 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
| * net: fix writev tests on AndroidElias Naur2016-12-011-1/+1
| | | | | | | | | | | | Change-Id: Iacced25363f54ee2cc1e00a71605dba7fb447162 Reviewed-on: https://go-review.googlesource.com/33772 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/compile: generate frame pointers for otherwise frameless functionsKeith Randall2016-12-014-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | func f() { g() } We mistakenly don't add a frame pointer for f. This means f isn't seen when walking the frame pointer linked list. That matters for kernel-gathered profiles, and is an impediment for issues like #16638. To fix, allocate a stack frame even for otherwise frameless functions like f. It is a bit tricky because we need to avoid some runtime internals that really, really don't want one. No test at the moment, as only kernel CPU profiles would catch it. Tests will come with the implementation of #16638. Fixes #18103 Change-Id: I411206cc9de4c8fdd265bee2e4fa61d161ad1847 Reviewed-on: https://go-review.googlesource.com/33754 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
| * crypto/x509: read Darwin trust settings for root CAsQuentin Smith2016-12-013-11/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Darwin separately stores bits indicating whether a root certificate should be trusted; this changes Go to read and use those when initializing SystemCertPool. Unfortunately, the trust API is very slow. To avoid a delay of up to 0.5s in initializing the system cert pool, we assume that the trust settings found in kSecTrustSettingsDomainSystem will always indicate trust. (That is, all root certs Apple distributes are trusted.) This is not guaranteed by the API but is true in practice. In the non-cgo codepath, we do not have that benefit, so we must check the trust status of every certificate. This causes about 0.5s of delay in initializing the SystemCertPool. On OS X 10.11 and older, the "security" command requires a certificate to be provided in a file and not on stdin, so the non-cgo codepath creates temporary files for each certificate, further slowing initialization. Updates #18141. Change-Id: If681c514047afe5e1a68de6c9d40ceabbce54755 Reviewed-on: https://go-review.googlesource.com/33721 Run-TryBot: Quentin Smith <quentin@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
| * cmd/compile: do not inline functions marked cgo_unsafe_argsDavid Lazar2016-12-011-0/+6
| | | | | | | | | | | | | | | | | | | | Now the net tests pass with -gcflags '-l=4'. Fixes #18125. Change-Id: I4e3a46eb0cb3a93b203e74f5bc99c5822331f535 Reviewed-on: https://go-review.googlesource.com/33722 Reviewed-by: Keith Randall <khr@golang.org>
| * cmd/objdump: copy gosym.PCValue into internal packageKeith Randall2016-12-012-9/+49
| | | | | | | | | | | | | | | | | | | | ... so we don't have to export gosym.PCValue. Change-Id: Ie8f196d5e5ab63e3e69d1d7b4bfbbf32b7b5e4f5 Reviewed-on: https://go-review.googlesource.com/33791 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * cmd/go: hide the "TERM" environment variable from "go bug"Mohit Agarwal2016-12-011-1/+5
| | | | | | | | | | | | | | | | | | | | Fixes #18128 Change-Id: I5530c9d774a1e398cd759a05bbf308e6e42f0007 Reviewed-on: https://go-review.googlesource.com/33810 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * net/http: clarify Request.Context's lifetimeBrad Fitzpatrick2016-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reverts https://golang.org/cl/23672 and tweaks the text to clarify HTTP/2 request cancelations also cancel the context (not just closing the TCP conn). Fixes #18143 Change-Id: I9f838e09b906d455c98f676e5bc5559f8f7ecb17 Reviewed-on: https://go-review.googlesource.com/33769 Reviewed-by: Chris Broadfoot <cbro@golang.org>
| * database/sql: document expectations for named parametersDaniel Theophanes2016-12-015-9/+35
| | | | | | | | | | | | | | | | | | | | Require parameter names to not begin with a symbol. Change-Id: I5dfe9d4e181f0daf71dad2f395aca41c68678cbe Reviewed-on: https://go-review.googlesource.com/33493 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * runtime: fix incorrect comment about bitvector layoutAustin Clements2016-12-011-1/+1
| | | | | | | | | | | | | | | | | | Commit 303b69fe packed bitvectors more tightly, but missed a comment describing their old layout. Update that comment. Change-Id: I095ccb01f245197054252545f37b40605a550dec Reviewed-on: https://go-review.googlesource.com/33718 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
| * Revert "runtime: handle SIGPIPE in c-archive and c-shared programs"Elias Naur2016-12-012-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d24b57a6a1a3530e590b7c0a72dc78043e198630. Reason for revert: Further complications arised (issue 18100). We'll try again in Go 1.9. Change-Id: I5ca93d2643a4be877dd9c2d8df3359718440f02f Reviewed-on: https://go-review.googlesource.com/33770 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org>
| * cmd/dist: add -check-armv6k command to check for ARMv6KShenghou Ma2016-12-015-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | so that our release note can reference a simple command to check if the processor implements ARMv6K or not. Updates #17082. Change-Id: I9ca52051e5517394a7cd6b778fb822c3ee435f84 Reviewed-on: https://go-review.googlesource.com/33686 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * sort: add Slice exampleBrad Fitzpatrick2016-12-011-0/+19
| | | | | | | | | | | | | | | | Change-Id: I34ba4eaf1d232b639998ad3bbb0d075dd097722b Reviewed-on: https://go-review.googlesource.com/33763 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dominik Honnef <dominik@honnef.co>
* | Merge branch 'master' into dev.garbageAustin Clements2016-12-051938-106382/+293680
|\ \ | |/ | | | | | | | | Sync to 1.8 beta 1. Change-Id: Iddd3773babd8fe50aed791ef7150d0c7c455cc8d
| * api: promote next.txt to go1.8.txt, update go toolgo1.8beta1Chris Broadfoot2016-12-011-1/+1
| | | | | | | | | | | | Change-Id: I37f2893ce14009efe095aac3bc811d650c66bf2a Reviewed-on: https://go-review.googlesource.com/33761 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/cgo: fix cgo checking when fetching errno valueIan Lance Taylor2016-12-011-18/+33
| | | | | | | | | | | | | | | | | | | | Fixes #18126. Change-Id: I7ae090945ef203673b06eb94817cc5c894b5eadc Reviewed-on: https://go-review.googlesource.com/33752 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * encoding/binary: document the new bool supportBrad Fitzpatrick2016-12-011-1/+4
| | | | | | | | | | | | | | | | Updates #16856 Change-Id: I57af6b0c0d5ecdaf19cf6f969b05ec9ec03058f1 Reviewed-on: https://go-review.googlesource.com/33756 Reviewed-by: Ian Lance Taylor <iant@golang.org>
| * cmd/go: document GOPATH default exceptionRuss Cox2016-11-302-2/+4
| | | | | | | | | | | | | | | | | | | | Doesn't get defaulted if $HOME/go is a GOROOT. Change-Id: I6ac8211a74029e4ad70a50f6e7884a039a27ab05 Reviewed-on: https://go-review.googlesource.com/33720 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * doc, cmd/go: adjust documentation for default GOPATHRuss Cox2016-11-302-12/+16
| | | | | | | | | | | | | | | | | | | | | | Replaces CL 33356. Fixes #17262. Change-Id: Idfb2343e90771775e51a66c63760f458737a288c Reviewed-on: https://go-review.googlesource.com/33730 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * cmd/compile: generate code that type checks when inlining variadic functionsDavid Lazar2016-11-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug in -l=3 or higher. To inline a variadic function, the compiler generates code that constructs a slice of arguments for the variadic parameter. Consider the function func Foo(xs ...string) and the call Foo("hello", "world"). To inline the call to Foo, the compiler used to generate xs := [2]string{"hello", "world"}[:] which doesn't type check: invalid operation [2]string literal[:] (slice of unaddressable value). Now, the compiler generates xs := []string{"hello", "world"} which does type check. Fixes #18116. Change-Id: I0ee531ef2e6cc276db6fb12602b25a46d6d5db21 Reviewed-on: https://go-review.googlesource.com/33671 Reviewed-by: Keith Randall <khr@golang.org>
| * database/sql: deflake query cancel testsDaniel Theophanes2016-11-302-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Rather then using a sleep in the fake DB, go to a channel select and wait for the context to be done. Fixes #18115 Change-Id: I6bc3a29db58c568d0a7ea06c2a354c18c9e798b2 Reviewed-on: https://go-review.googlesource.com/33712 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * runtime: fix undead arguments in cgocallAustin Clements2016-11-301-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the garbage collector's perspective, time can move backwards in cgocall. However, in the midst of this time warp, the pointer arguments to cgocall can go from dead back to live. If a stack growth happens while they're dead and then a GC happens when they become live again, GC can crash with a bad heap pointer. Specifically, the sequence that leads to a panic is: 1. cgocall calls entersyscall, which saves the PC and SP of its call site in cgocall. Call this PC/SP "X". At "X" both pointer arguments are live. 2. cgocall calls asmcgocall. Call the PC/SP of this call "Y". At "Y" neither pointer argument is live. 3. asmcgocall calls the C code, which eventually calls back into the Go code. 4. cgocallbackg remembers the saved PC/SP "X" in some local variables, calls exitsyscall, and then calls cgocallbackg1. 5. The Go code causes a stack growth. This stack unwind sees PC/SP "Y" in the cgocall frame. Since the arguments are dead at "Y", they are not adjusted. 6. The Go code returns to cgocallbackg1, which calls reentersyscall with the recorded saved PC/SP "X", so "X" gets stashed back into gp.syscallpc/sp. 7. GC scans the stack. It sees there's a saved syscall PC/SP, so it starts the traceback at PC/SP "X". At "X" the arguments are considered live, so it scans them, but since they weren't adjusted, the pointers are bad, so it panics. This issue started as of commit ca4089ad, when the compiler stopped marking arguments as live for the whole function. Since this is a variable liveness issue, fix it by adding KeepAlive calls that keep the arguments live across this whole time warp. The existing issue7978 test has all of the infrastructure for testing this except that it's currently up to chance whether a stack growth happens in the callback (it currently only happens on the linux-amd64-noopt builder, for example). Update this test to force a stack growth, which causes it to fail reliably without this fix. Fixes #17785. Change-Id: If706963819ee7814e6705693247bcb97a6f7adb8 Reviewed-on: https://go-review.googlesource.com/33710 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
| * runtime: use standard comment style in cgocallAustin Clements2016-11-301-15/+11
| | | | | | | | | | | | | | Change-Id: I9f2c2da4aa512729ae40562b06601da95ba50d6f Reviewed-on: https://go-review.googlesource.com/33689 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
| * database/sql: rename NamedParam to NamedArg and Param to NamedDaniel Theophanes2016-11-303-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | Be consistent with the argument names already provided. Also parameter is the variable, argument is the value. Fixes #18099 Change-Id: Idb3f4e9ffc214036c721ddb4f614ec6c95bb7778 Reviewed-on: https://go-review.googlesource.com/33660 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
| * net/http: document how headers are forwarded by ClientJoe Tsai2016-11-301-2/+27
| | | | | | | | | | | | | | | | Fixes #18096 Change-Id: I22e1abb75dc19c4d1985b6857c79a81b9db5a76c Reviewed-on: https://go-review.googlesource.com/33670 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * net/http: fix test TestServeMuxHandlerRedirectsShenghou Ma2016-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was intended to test that mux handler should redirect at most once, but the added loop condition defeated that. Remove the loop condition and document the intention better. Fixes #18068. Change-Id: I2a4ea041eae27168b45a09aa46e740ac03921594 Reviewed-on: https://go-review.googlesource.com/33654 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
| * net/http: remove logging on bad client requestsKenny Grant2016-11-301-2/+0
| | | | | | | | | | | | | | | | | | | | As discussed in #18095 the server should not log for bad user input. Change-Id: I628a796926eff3a971e5b04abec17ea377c3f9b7 Reviewed-on: https://go-review.googlesource.com/33617 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * cmd/compile/internal/gc: document variables and functionsKevin Burke2016-11-303-0/+10
| | | | | | | | | | | | Change-Id: I01b2278eb50585331b8ff7ff5e3c1f9c5ba52b63 Reviewed-on: https://go-review.googlesource.com/33156 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
| * go/ast: fix doc string for ast.GenDeclRobert Griesemer2016-11-291-1/+1
| | | | | | | | | | | | | | | | Fixes #18109. Change-Id: I5e3a44422794b7bae7741523fb7cacb6ba147af7 Reviewed-on: https://go-review.googlesource.com/33669 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| * net: expand nss myhostname fallback detectionDan Peterson2016-11-293-59/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | Expand myhostname fallback detection to properly detect the local hostname in addition to other supported special names and suffixes. Fixes #17967 Change-Id: I1fe141fd9838b25886c08b6f2fd325e58be60457 Reviewed-on: https://go-review.googlesource.com/33550 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
| * crypto/tls: update CBC Lucky13 warning a bitBrad Fitzpatrick2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | Some countermeasures were implemented in https://golang.org/cl/18130 Updates #13385 Change-Id: I723e1e3be0fa6d13767b65b145d90c89e92b2774 Reviewed-on: https://go-review.googlesource.com/33665 Reviewed-by: Adam Langley <agl@golang.org>
| * cmd/compile/internal/syntax: remove unused node fieldRobert Griesemer2016-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The doc field is not yet used - remove it for now (we may end up with a different solution for 1.9). This reduces memory consumption for parsing all of std lib by about 40MB and makes parsing slightly faster. Change-Id: Iafb00b9c7f1be9c66fdfb29096d3da5049b2fcf5 Reviewed-on: https://go-review.googlesource.com/33661 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
| * database/sql: do not bypass the driver locks with Context methodsDaniel Theophanes2016-11-295-217/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When context methods were initially added it was attempted to unify behavior between drivers without Context methods and those with Context methods to always return right away when the Context expired. However in doing so the driver call could be executed outside of the scope of the driver connection lock and thus bypassing thread safety. The new behavior waits until the driver operation is complete. It then checks to see if the context has expired and if so returns that error. Change-Id: I4a5c7c3263420c57778f36a5ed6fa0ef8cb32b20 Reviewed-on: https://go-review.googlesource.com/32422 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>