1. 28 Sep, 2017 8 commits
  2. 27 Sep, 2017 23 commits
  3. 26 Sep, 2017 9 commits
    • Daniel Martí's avatar
      net/http: error if Transport.Proxy returns https · e61c5e2f
      Daniel Martí authored
      Transport.Proxy is documented as only supporting the http and socks5
      schemes. If one tries to use it for https URLs, they end up with a
      cryptic error like:
      
      	http: TLS handshake error from [...]: tls: oversized record received with length 20037
      
      This is because Transport simply skips TLS if Proxy is non-nil, since it
      knows it doesn't support Proxy with https.
      
      However, that error is very confusing and it can take a while to figure
      out what's going on. Instead, error if Proxy is used and it returns an
      unsupported scheme.
      
      Updates #19493.
      
      Change-Id: Ia036357011752f45bb9b8282a4ab5e31bc8d1a69
      Reviewed-on: https://go-review.googlesource.com/66010
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarTom Bergan <tombergan@google.com>
      e61c5e2f
    • Austin Clements's avatar
      runtime: make runtime.GC() trigger GC even if GOGC=off · 0744c21b
      Austin Clements authored
      Currently, the priority of checks in (gcTrigger).test() puts the
      gcpercent<0 test above gcTriggerCycle, which is used for runtime.GC().
      This is an unintentional change from 1.8 and before, where
      runtime.GC() triggered a GC even if GOGC=off.
      
      Fix this by rearranging the priority so the gcTriggerCycle test
      executes even if gcpercent < 0.
      
      Fixes #22023.
      
      Change-Id: I109328d7b643b6824eb9d79061a9e775f0149575
      Reviewed-on: https://go-review.googlesource.com/65994
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRick Hudson <rlh@golang.org>
      0744c21b
    • Ian Lance Taylor's avatar
      internal/poll: don't return from Close until descriptor is closed · 382d4928
      Ian Lance Taylor authored
      This permits the program to reliably know that when the Close method
      returns, the descriptor has definitely been closed. This matters at
      least for listeners.
      
      Fixes #21856
      Updates #7970
      
      Change-Id: I1fd0cfd2333649e6e67c6ae956e19fdff3a35a83
      Reviewed-on: https://go-review.googlesource.com/66150
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJoe Tsai <joetsai@google.com>
      382d4928
    • Giovanni Bajo's avatar
      runtime: improve comments for nextSample · 8e11cb3f
      Giovanni Bajo authored
      The previous comment of nextSample didn't mention Poisson processes,
      which is the reason why it needed to create an exponential
      distribution, so it was hard to follow the reasoning for people
      not highly familiar with statistics.
      
      Since we're at it, we also make it clear that we are just creating
      a random number with exponential distribution by moving the
      bulk of the function into a new fastexprand().
      
      No functional changes.
      
      Change-Id: I9c275e87edb3418ee0974257af64c73465028ad7
      Reviewed-on: https://go-review.googlesource.com/65657Reviewed-by: default avatarAustin Clements <austin@google.com>
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8e11cb3f
    • Keith Randall's avatar
      cmd/compile: fix sign-extension merging rules · 3f04db41
      Keith Randall authored
      If we have
      
        y = <int16> (MOVBQSX x)
        z = <int32> (MOVWQSX y)
      
      We used to use this rewrite rule:
      
      (MOVWQSX x:(MOVBQSX _)) -> x
      
      But that resulted in replacing z with a value whose type
      is only int16.  Then if z is spilled and restored, it gets
      zero extended instead of sign extended.
      
      Instead use the rule
      
      (MOVWQSX (MOVBQSX x)) -> (MOVBQSX x)
      
      The result is has the correct type, so it can be spilled
      and restored correctly.  It might mean that a few more extension
      ops might not be eliminated, but that's the price for correctness.
      
      Fixes #21963
      
      Change-Id: I6ec82c3d2dbe43cc1fee6fb2bd6b3a72fca3af00
      Reviewed-on: https://go-review.googlesource.com/65290Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3f04db41
    • Nicolas BRULEZ's avatar
      syscall: allow abstract unix socket to use the full Path len · 08a17966
      Nicolas BRULEZ authored
      The previous implementation forced all Unix socket to have a name
      strictly shorter than len(sa.raw.Path) to allow a terminating NULL
      byte to be added. This requirement does not apply to abstract socket
      names under Linux, so for this case we allow the full length.
      
      Fixes #21965
      
      Change-Id: I1d1f58b6b6172d589428c7230cfeae984de78b4b
      Reviewed-on: https://go-review.googlesource.com/66190
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      08a17966
    • Ian Lance Taylor's avatar
      cmd/link: don't use internal linking mode for cgo on PPC64 · c99cfd93
      Ian Lance Taylor authored
      The internal linker doesn't know how to handle multiple TOC sections
      in internal linking mode. This used to work because before CL 64793 we
      invoked ld -r on multiple objects, and that merged the TOC sections
      for us.
      
      Updates #21961
      
      Change-Id: I48260a7195be660016f2f358ebc8cb79652210ab
      Reviewed-on: https://go-review.googlesource.com/66270
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarLynn Boger <laboger@linux.vnet.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c99cfd93
    • Lynn Boger's avatar
      cmd/compile: fix regression in PPC64.rules move zero · 3fda3765
      Lynn Boger authored
      When a MOVDstorezero (8 bytes) is used the offset field
      in the instruction must be a multiple of 4. This situation
      had been corrected in the rules for other types of stores
      but not for the zero case.
      
      This also removes some of the special MOVDstorezero cases since
      they can be handled by the general LowerZero case.
      
      Updates made to the ssa test for lowering zero moves to
      include cases where the target is not aligned to at least 4.
      
      Fixes #21947
      
      Change-Id: I7cceceb1be4898c77cd3b5e78b58dce0a7e28edd
      Reviewed-on: https://go-review.googlesource.com/64970
      Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      3fda3765
    • Alex Brainman's avatar
      internal/poll: be explicit when using runtime netpoller · 8e2d90dc
      Alex Brainman authored
      internal/poll package assumes that only net sockets use runtime
      netpoller on windows. We get memory corruption if other file
      handles are passed into runtime poller. Make FD.Init receive
      and use useNetpoller argument, so FD.Init caller is explicit
      about using runtime netpoller.
      
      Fixes #21172
      
      Change-Id: I60e2bfedf9dda9b341eb7a3e5221035db29f5739
      Reviewed-on: https://go-review.googlesource.com/65810Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8e2d90dc