1. 26 Jan, 2017 4 commits
    • Chris Broadfoot's avatar
      [release-branch.go1.8] all: merge master into release-branch.go1.8 · 2f6c20b4
      Chris Broadfoot authored
      78860b2a cmd/go: don't reject ./... matching top-level file outside GOPATH
      2b283ced database/sql: fix race when canceling queries immediately
      1cf08182 go/printer: fix format with leading comments in composite literal
      b531eb30 runtime: reorder modules so main.main comes first
      165cfbc4 database/sql: let tests wait for db pool to come to expected state
      ea736493 doc: update gccgo docs
      1db16711 doc: clarify what to do with Go 1.4 when installing from source
      3717b429 doc: note that plugins are not fully baked
      98842cab net/http: don't send body on redirects for 301, 302, 303 when GetBody is set
      314180e7 net/http: fix a nit
      aad06da2 cmd/link: mark DWARF function symbols as reachable
      be9dcfec doc: mention testing.MainStart signature change
      a96e117a runtime: amd64, use 4-byte ops for memmove of 4 bytes
      4cce27a3 cmd/compile: fix constant propagation through s390x MOVDNE instructions
      1be957d7 misc/cgo/test: pass current environment to syscall.Exec
      ec654e22 misc/cgo/test: fix test when using GCC 7
      256a605f cmd/compile: don't use nilcheck information until the next block
      e8d5989e cmd/compile: fix compilebench -alloc
      ea7d9e6a runtime: check for nil g and m in msanread
      
      Change-Id: I61d508d4f0efe4b72e7396645c8ad6088d2bfa6e
      2f6c20b4
    • Ian Lance Taylor's avatar
      cmd/go: don't reject ./... matching top-level file outside GOPATH · 78860b2a
      Ian Lance Taylor authored
      This unwinds a small part of CL 31668: we now accept "./." in cleanImport.
      
      Fixes #18778.
      
      Change-Id: Ia7f1fde1cafcea3cc9e0b597a95a0e0bb410a3ed
      Reviewed-on: https://go-review.googlesource.com/35646
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      78860b2a
    • Daniel Theophanes's avatar
      database/sql: fix race when canceling queries immediately · 2b283ced
      Daniel Theophanes authored
      Previously the following could happen, though in practice it would
      be rare.
      
      Goroutine 1:
      	(*Tx).QueryContext begins a query, passing in userContext
      
      Goroutine 2:
      	(*Tx).awaitDone starts to wait on the context derived from the passed in context
      
      Goroutine 1:
      	(*Tx).grabConn returns a valid (*driverConn)
      	The (*driverConn) passes to (*DB).queryConn
      
      Goroutine 3:
      	userContext is canceled
      
      Goroutine 2:
      	(*Tx).awaitDone unblocks and calls (*Tx).rollback
      	(*driverConn).finalClose obtains dc.Mutex
      	(*driverConn).finalClose sets dc.ci = nil
      
      Goroutine 1:
      	(*DB).queryConn obtains dc.Mutex in withLock
      	ctxDriverPrepare accepts dc.ci which is now nil
      	ctxCriverPrepare panics on the nil ci
      
      The fix for this is to guard the Tx methods with a RWLock
      holding it exclusivly when closing the Tx and holding a read lock
      when executing a query.
      
      Fixes #18719
      
      Change-Id: I37aa02c37083c9793dabd28f7f934a1c5cbc05ea
      Reviewed-on: https://go-review.googlesource.com/35550
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      2b283ced
    • Robert Griesemer's avatar
      go/printer: fix format with leading comments in composite literal · 1cf08182
      Robert Griesemer authored
      This fix is less pervasive than it seems. The only change affecting
      formatting is on printer.go:760. The remaining changes have no effect
      on formatting since the value of p.level is ignored except on this
      specific line.
      
      The remaining changes are:
      - renamed adjBlock to funcBody since that's how it is used
      - introduced new printer field 'level' tracking the composite
        literal nesting level
      - update/restore the composite literal nesting level as needed
      
      Fixes #18782.
      
      Change-Id: Ie833a9b5a559c4ec0f2eef2c5dc97aa263dca53a
      Reviewed-on: https://go-review.googlesource.com/35811Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1cf08182
  2. 25 Jan, 2017 2 commits
  3. 24 Jan, 2017 7 commits
  4. 23 Jan, 2017 1 commit
    • Keith Randall's avatar
      runtime: amd64, use 4-byte ops for memmove of 4 bytes · a96e117a
      Keith Randall authored
      memmove used to use 2 2-byte load/store pairs to move 4 bytes.
      When the result is loaded with a single 4-byte load, it caused
      a store to load fowarding stall.  To avoid the stall,
      special case memmove to use 4 byte ops for the 4 byte copy case.
      
      We already have a special case for 8-byte copies.
      386 already specializes 4-byte copies.
      I'll do 2-byte copies also, but not for 1.8.
      
      benchmark                 old ns/op     new ns/op     delta
      BenchmarkIssue18740-8     7567          4799          -36.58%
      
      3-byte copies get a bit slower.  Other copies are unchanged.
      name         old time/op   new time/op   delta
      Memmove/3-8   4.76ns ± 5%   5.26ns ± 3%  +10.50%  (p=0.000 n=10+10)
      
      Fixes #18740
      
      Change-Id: Iec82cbac0ecfee80fa3c8fc83828f9a1819c3c74
      Reviewed-on: https://go-review.googlesource.com/35567
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      a96e117a
  5. 21 Jan, 2017 1 commit
  6. 20 Jan, 2017 4 commits
  7. 19 Jan, 2017 4 commits
  8. 18 Jan, 2017 4 commits
  9. 17 Jan, 2017 4 commits
  10. 16 Jan, 2017 4 commits
  11. 14 Jan, 2017 4 commits
  12. 13 Jan, 2017 1 commit
    • Brad Fitzpatrick's avatar
      net/http: make sure Hijack's bufio.Reader includes pre-read background byte · b2a3b54b
      Brad Fitzpatrick authored
      Previously, if the Hijack called stopped the background read call
      which read a byte, that byte was sitting in memory, buffered, ready to
      be Read by Hijack's returned bufio.Reader, but it wasn't yet in the
      bufio.Reader's buffer itself, so bufio.Reader.Buffered() reported 1
      byte fewer.
      
      This matters for callers who wanted to stitch together any buffered
      data (with bufio.Reader.Peek(bufio.Reader.Buffered())) with Hijack's
      returned net.Conn. Otherwise there was no way for callers to know a
      byte was read.
      
      Change-Id: Id7cb0a0a33fe2f33d79250e13dbaa9c0f7abba13
      Reviewed-on: https://go-review.googlesource.com/35232
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      b2a3b54b