1. 15 Nov, 2018 1 commit
  2. 14 Nov, 2018 14 commits
  3. 13 Nov, 2018 18 commits
  4. 12 Nov, 2018 7 commits
    • Emmanuel T Odeke's avatar
      net: preserve unexpired context values for LookupIPAddr · 5d392600
      Emmanuel T Odeke authored
      To avoid any cancelation of the parent context from affecting
      lookupGroup operations, Resolver.LookupIPAddr previously used
      an entirely new context created from context.Background().
      However, this meant that all the values in the parent context
      with which LookupIPAddr was invoked were dropped.
      
      This change provides a custom context implementation
      that only preserves values of the parent context by composing
      context.Background() and the parent context. It only falls back
      to the parent context to perform value lookups if the parent
      context has not yet expired.
      This context is never canceled, and has no deadlines.
      
      Fixes #28600
      
      Change-Id: If2f570caa26c65bad638b7102c35c79d5e429fea
      Reviewed-on: https://go-review.googlesource.com/c/148698
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5d392600
    • Filippo Valsorda's avatar
      crypto/tls: don't modify Config.Certificates in BuildNameToCertificate · 70e3b1df
      Filippo Valsorda authored
      The Config does not own the memory pointed to by the Certificate slice.
      Instead, opportunistically use Certificate.Leaf and let the application
      set it if it desires the performance gain.
      
      This is a partial rollback of CL 107627. See the linked issue for the
      full explanation.
      
      Fixes #28744
      
      Change-Id: I33ce9e6712e3f87939d9d0932a06d24e48ba4567
      Reviewed-on: https://go-review.googlesource.com/c/149098Reviewed-by: 's avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      70e3b1df
    • Ali Rizvi-Santiago's avatar
      runtime/cgo: added missing includes for errno.h to the windows gcc stubs. · 595bc63e
      Ali Rizvi-Santiago authored
      This adds the includes for errno.h to the windows stubs
      for runtime/cgo so that "errno" is properly declared.
      
      Due to "errno" not being properly declared, the compiler is
      forced to assume it's an external which leaves it up to the
      linker. This is an issue in some implementations as errno
      might be a macro which results in an unresolved symbol error
      during linking.
      
      runtime/cgo/gcc_libinit_windows.c: added include
      runtime/cgo/gcc_windows_386.c: added include
      runtime/cgo/gcc_windows_amd64.c: added include
      
      Change-Id: I77167d02f7409462979135efc55cf50bbc6bd363
      GitHub-Last-Rev: 90da06ee3cbec3f51c6d31185868bb70341ce9d3
      GitHub-Pull-Request: golang/go#28747
      Reviewed-on: https://go-review.googlesource.com/c/149118
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      595bc63e
    • Austin Clements's avatar
      cmd/compile: fix race on initializing Sym symFunc flag · 5cf2b4c2
      Austin Clements authored
      SSA lowering can create PFUNC ONAME nodes when compiling method calls.
      Since we generally initialize the node's Sym to a func when we set its
      class to PFUNC, we did this here, too. Unfortunately, since SSA
      compilation is concurrent, this can cause a race if two function
      compilations try to initialize the same symbol.
      
      Luckily, we don't need to do this at all, since we're actually just
      wrapping an ONAME node around an existing Sym that's already marked as
      a function symbol.
      
      Fixes the linux-amd64-racecompile builder, which was broken by CL
      147158.
      
      Updates #27539.
      
      Change-Id: I8ddfce6e66a08ce53998c5bfa6f5a423c1ffc1eb
      Reviewed-on: https://go-review.googlesource.com/c/149158
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      5cf2b4c2
    • Austin Clements's avatar
      cmd/compile: create "init" symbol earlier · b52db19b
      Austin Clements authored
      We create the "init" symbol and mark it as a function before compiling
      to SSA because SSA can initialize this symbol, but it turns out we do
      it slightly too late. peekitabs, at least, can also create the "init"
      LSym. Move this initialization to just after type-checking.
      
      Fixes the linux-amd64-ssacheck and the android-arm64-wiko-fever
      builders.
      
      Updates #27539.
      
      Change-Id: If145952c79d39f75c93b24e35e67fe026dd08329
      Reviewed-on: https://go-review.googlesource.com/c/149137
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      b52db19b
    • Austin Clements's avatar
      cmd/compile: fix TestFormats · 891f99eb
      Austin Clements authored
      This fixes the linux-amd64-longtest builder, which was broken by CL
      147160.
      
      Updates #27539.
      
      Change-Id: If6e69581ef503bba2449ec9bacaa31f34f59beb1
      Reviewed-on: https://go-review.googlesource.com/c/149157Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      891f99eb
    • Austin Clements's avatar
      cmd/compile, cmd/link: separate stable and internal ABIs · 685aca45
      Austin Clements authored
      This implements compiler and linker support for separating the
      function calling ABI into two ABIs: a stable and an internal ABI. At
      the moment, the two ABIs are identical, but we'll be able to evolve
      the internal ABI without breaking existing assembly code that depends
      on the stable ABI for calling to and from Go.
      
      The Go compiler generates internal ABI symbols for all Go functions.
      It uses the symabis information produced by the assembler to create
      ABI wrappers whenever it encounters a body-less Go function that's
      defined in assembly or a Go function that's referenced from assembly.
      
      Since the two ABIs are currently identical, for the moment this is
      implemented using "ABI alias" symbols, which are just forwarding
      references to the native ABI symbol for a function. This way there's
      no actual code involved in the ABI wrapper, which is good because
      we're not deriving any benefit from it right now. Once the ABIs
      diverge, we can eliminate ABI aliases.
      
      The linker represents these different ABIs internally as different
      versions of the same symbol. This way, the linker keeps us honest,
      since every symbol definition and reference also specifies its
      version. The linker is responsible for resolving ABI aliases.
      
      Fixes #27539.
      
      Change-Id: I197c52ec9f8fc435db8f7a4259029b20f6d65e95
      Reviewed-on: https://go-review.googlesource.com/c/147160
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      685aca45